Documentation ¶
Overview ¶
Package repo manages interfacing with a repo
Index ¶
- Variables
- type PatchsetCache
- type Repo
- func (r *Repo) AddPatchset(ps *patchset.Patchset) error
- func (r *Repo) CheckoutBase() error
- func (r *Repo) CheckoutBranch(name string) error
- func (r *Repo) CheckoutIndirectBranch(name string) error
- func (r *Repo) CheckoutPatchset(patchset string) error
- func (r *Repo) CheckoutRev(rev string) error
- func (r *Repo) CherryPickToHead(id string) error
- func (r *Repo) CompareTreeToHead(kiltRef string) (bool, error)
- func (r *Repo) DeleteKiltRef(name string) error
- func (r *Repo) DescribeCommit(id string) (string, error)
- func (r *Repo) DetachHead() error
- func (r *Repo) KiltBase() string
- func (r *Repo) KiltBranch() string
- func (r *Repo) KiltDirectory() string
- func (r *Repo) LookupKiltRef(name string) (string, error)
- func (r *Repo) PatchsetCache() (PatchsetCache, error)
- func (r *Repo) PatchsetIndex() (map[string]int, error)
- func (r *Repo) PatchsetMap() (map[string]*patchset.Patchset, error)
- func (r *Repo) Patchsets() ([]*patchset.Patchset, error)
- func (r *Repo) ReworkInProgress() (bool, error)
- func (r *Repo) SetBranchToHead(name string) error
- func (r *Repo) SetHead(name string) error
- func (r *Repo) SetIndirectBranchToHead(name string) error
- func (r *Repo) UpdateMetadataForCommit(id string) error
- func (r *Repo) WriteRefHead(name string) error
- func (r *Repo) WriteSymbolicRefBranch(name, branchName string) error
- func (r *Repo) WriteSymbolicRefHead(name string) error
Constants ¶
This section is empty.
Variables ¶
var ErrUserActionRequired = errors.New("conflicts during cherry pick")
ErrUserActionRequired is returned when an action couldn't be completed and requires user intervention.
Functions ¶
This section is empty.
Types ¶
type PatchsetCache ¶
type PatchsetCache struct { Slice []*patchset.Patchset Index map[string]int Map map[string]*patchset.Patchset }
PatchsetCache provides a convenient way to look up cached patchsets.
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
Repo wraps git repo state for repository manipulations
func (*Repo) AddPatchset ¶
AddPatchset will add the given patchset to the head of the repo
func (*Repo) CheckoutBase ¶
CheckoutBase will checkout the kilt base rev.
func (*Repo) CheckoutBranch ¶
CheckoutBranch will checkout the given branch.
func (*Repo) CheckoutIndirectBranch ¶
CheckoutIndirectBranch will resolve the ref and checkout the branch that the resolved target points to.
func (*Repo) CheckoutPatchset ¶
CheckoutPatchset will checkout the latest patch in the given patchset.
func (*Repo) CheckoutRev ¶
CheckoutRev will checkout the given rev.
func (*Repo) CherryPickToHead ¶
CherryPickToHead will cherrypick a commit with the given id to the current head.
func (*Repo) CompareTreeToHead ¶
CompareTreeToHead checks whether the tree pointed to by kiltRef is equal to the tree at head.
func (*Repo) DeleteKiltRef ¶
DeleteKiltRef will delete the specified kilt ref.
func (*Repo) DescribeCommit ¶
DescribeCommit returns a short ID and description for the commit.
func (*Repo) DetachHead ¶
DetachHead will detach the head from the current branch but stay on the same commit.
func (*Repo) KiltBranch ¶
KiltBranch returns the name of the current kilt branch.
func (*Repo) KiltDirectory ¶
KiltDirectory returns a full path to the kilt subdirectory of the .git directory.
func (*Repo) LookupKiltRef ¶
LookupKiltRef will lookup the specified ref name under the kilt ref path.
func (*Repo) PatchsetCache ¶
func (r *Repo) PatchsetCache() (PatchsetCache, error)
PatchsetCache reads and returns a map of patchset names to an index in the patchset list
func (*Repo) PatchsetIndex ¶
PatchsetIndex reads and returns a map of patchset names to an index in the patchset list
func (*Repo) PatchsetMap ¶
PatchsetMap reads and returns a map of patchset names to patchsets
func (*Repo) ReworkInProgress ¶
ReworkInProgress checks whether there is currently a rework operation in progress.
func (*Repo) SetBranchToHead ¶
SetBranchToHead will set the given branch to point to HEAD.
func (*Repo) SetIndirectBranchToHead ¶
SetIndirectBranchToHead will resolve the ref and set head to point to the resolved target.
func (*Repo) UpdateMetadataForCommit ¶
UpdateMetadataForCommit will increment the version number of the given metadata commit.
func (*Repo) WriteRefHead ¶
WriteRefHead will write the current head to the specified kilt ref.
func (*Repo) WriteSymbolicRefBranch ¶
WriteSymbolicRefBranch will write the given symbolic branch to the specified kilt ref.
func (*Repo) WriteSymbolicRefHead ¶
WriteSymbolicRefHead will write the current symbolic head to the specified kilt ref.