Documentation
¶
Index ¶
- func Add(dir string, files []string) error
- func Checkout(dir, branch string) error
- func Commit(dir, message string) error
- func CreateBranch(dir, name string) error
- func CreateWorktree(of, name, ref string) (string, error)
- func Diff(dir string, ref string) ([]string, error)
- func EnsureCleanAndUpToDateWorkingCopy(catalogDir string, out io.Writer) error
- func Fetch(dir string) error
- func FetchTags(dir string) error
- func GetCurrentBranch(dir string) (string, error)
- func GetCurrentCommit(dir string) (string, error)
- func GetUncommittedChanges(dir string) ([]string, error)
- func GetUncommittedChangesWithOpts(dir string, opts UncommittedChangesOptions) ([]string, error)
- func IsBranchInSyncWithRemote(dir string, branch string) (bool, error)
- func IsDirty(dir string, opts UncommittedChangesOptions) (bool, error)
- func IsValid(dir string) bool
- func Pull(dir string, args ...string) error
- func Push(dir string, args ...string) error
- func PushNewBranch(dir, name string) error
- func RemoveWorktree(of, path string) error
- func Reset(dir string) error
- func RevParse(of, ref string) (string, error)
- func Run(dir string, io internal.IO, args []string) error
- func Stash(dir string) error
- func StashApply(dir string) error
- func SwitchBack(dir string) error
- type UncommittedChangesOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBranch ¶
func CreateWorktree ¶ added in v0.79.0
CreateWorktree creates a worktree within joy's cache with the given name at the given ref. It attempts a best effort removal of the worktree if it exists prior to running this command.
func GetCurrentBranch ¶
func GetCurrentCommit ¶
func GetUncommittedChanges ¶
func GetUncommittedChangesWithOpts ¶ added in v0.54.3
func GetUncommittedChangesWithOpts(dir string, opts UncommittedChangesOptions) ([]string, error)
func IsDirty ¶ added in v0.35.0
func IsDirty(dir string, opts UncommittedChangesOptions) (bool, error)
IsDirty check if any files in the the git directory specified by dir have been modified.
func PushNewBranch ¶
func RemoveWorktree ¶ added in v0.79.0
func RevParse ¶ added in v0.79.0
RevParse performs git rev-parse for a given revision. If the argument is ambiguous, like that of a branch that has never been checked out, we try the origin revision.
func StashApply ¶ added in v0.35.0
func SwitchBack ¶ added in v0.34.0
Types ¶
type UncommittedChangesOptions ¶ added in v0.54.3
type UncommittedChangesOptions struct {
SkipUntrackedFiles bool
}
Click to show internal directories.
Click to hide internal directories.