Documentation
¶
Index ¶
- type Repo
- func (r *Repo) Add() error
- func (r *Repo) Checkout(tag string) error
- func (r *Repo) CheckoutHead() error
- func (r *Repo) Commit(message string) (string, error)
- func (r *Repo) Diff(refs ...string) (string, error)
- func (r *Repo) Exists() bool
- func (r *Repo) GetCurrentTag() (int, error)
- func (r *Repo) GetFilePath() string
- func (r *Repo) GetLatestTagNumber() (int, error)
- func (r *Repo) HasChanges() (bool, error)
- func (r *Repo) Init() error
- func (r *Repo) Log() ([]Snapshot, error)
- func (r *Repo) Tag(name string) error
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repo ¶
type Repo struct {
GitDir string // .oops/filename.git
WorkTree string // directory containing the file
FileName string // the tracked file name
// contains filtered or unexported fields
}
Repo represents a Git repository for a single file
func (*Repo) CheckoutHead ¶
CheckoutHead restores the file to HEAD
func (*Repo) GetCurrentTag ¶
GetCurrentTag returns the current tag (based on HEAD)
func (*Repo) GetFilePath ¶
GetFilePath returns the full path to the tracked file
func (*Repo) GetLatestTagNumber ¶
GetLatestTagNumber returns the highest tag number (vN format)
func (*Repo) HasChanges ¶
HasChanges checks if working file differs from HEAD
Click to show internal directories.
Click to hide internal directories.