Versions in this module Expand all Collapse all v1 v1.0.0 Sep 11, 2020 Changes in this version + const FetchHead + const Head + type ChangeList struct + Author string + Description string + SHA SHA + Subject string + type Git struct + func New(wd string) (Git, error) + func (g Git) CanApplyPatch(ctx context.Context, patch string) (bool, error) + func (g Git) Checkout(ctx context.Context, sha SHA) error + func (g Git) CheckoutBranch(ctx context.Context, branch string) error + func (g Git) CurrentBranch(ctx context.Context) (string, error) + func (g Git) Fetch(ctx context.Context) (localNew, remoteNew int, err error) + func (g Git) Get(ctx context.Context, path string, at SHA) ([]byte, error) + func (g Git) GetPatch(ctx context.Context, from, to SHA) (string, error) + func (g Git) HeadCL(ctx context.Context, at string) (ChangeList, error) + func (g Git) Log(ctx context.Context, count int) ([]ChangeList, error) + func (g Git) LogFrom(ctx context.Context, at string, count int) ([]ChangeList, error) + func (g Git) Parent(ctx context.Context, cl ChangeList) (ChangeList, error) + func (g Git) Rebase(ctx context.Context, targetBranch string) error + func (g Git) ResetToHead(ctx context.Context) error + func (g Git) Status(ctx context.Context) (Status, error) + type SHA [20]byte + func (i *SHA) Parse(str string) error + func (i *SHA) UnmarshalJSON(data []byte) error + func (i SHA) IsValid() bool + func (i SHA) MarshalJSON() ([]byte, error) + func (i SHA) String() string + type Status struct + AddedToIndex []string + CopiedInIndex []string + DeletedFromIndex []string + DeletedInWorkTree []string + Ignored []string + IndexAndWorkTreeMatches []string + NotUpdated []string + RenamedInIndex []string + UnmergedAddedByThem []string + UnmergedAddedByUs []string + UnmergedBothAdded []string + UnmergedBothDeleted []string + UnmergedBothModified []string + UnmergedDeletedByThem []string + UnmergedDeletedByUs []string + Untracked []string + UpdatedInIndex []string + WorkTreeChangedSinceIndex []string + func (s Status) Clean() bool + func (s Status) String() string Incompatible versions in this module v2.0.0+incompatible Jul 8, 2021