Documentation ¶
Overview ¶
Package repo implements support for Git repositories.
Index ¶
- type Repo
- func (r *Repo) Error(dsc string, em string)
- func (r *Repo) GitAbbrevRef()
- func (r *Repo) GitAdd(f flags.Flags)
- func (r *Repo) GitClear()
- func (r *Repo) GitClone(f flags.Flags)
- func (r *Repo) GitCommit(f flags.Flags)
- func (r *Repo) GitConfigOriginURL()
- func (r *Repo) GitDiffsNameOnly()
- func (r *Repo) GitLocalSHA()
- func (r *Repo) GitMergeBaseSHA()
- func (r *Repo) GitPop(f flags.Flags)
- func (r *Repo) GitPull(f flags.Flags)
- func (r *Repo) GitPush(f flags.Flags)
- func (r *Repo) GitRemoteUpdate()
- func (r *Repo) GitRevParseUpstream()
- func (r *Repo) GitSchedule(f flags.Flags, st *stat.Stat)
- func (r *Repo) GitShortstat()
- func (r *Repo) GitStash(f flags.Flags)
- func (r *Repo) GitUntracked()
- func (r *Repo) GitUpstreamBranch()
- func (r *Repo) SetStatus(f flags.Flags)
- func (r *Repo) UserConfirm(f flags.Flags)
- func (r *Repo) VerifyWorkspace(f flags.Flags, st *stat.Stat)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repo ¶
type Repo struct { BundlePath string // "~/tmpgis" Workspace string // "main" or "go-lang" User string // "jychri" Remote string // "github" or "gitlab" Name string // "git-in-sync" WorkspacePath string // "/Users/jychri/tmpgis/go-lang/" RepoPath string // "/Users/jychri/tmpgis/go-lang/git-in-sync" GitPath string // "/Users/jychri/tmpgis/go-lang/git-in-sync/.git" GitDir string // "--git-dir=/Users/jychri/tmpgis/go-lang/git-in-sync/.git" WorkTree string // "--work-tree=/Users/jychri/tmpgis/go-lang/git-in-sync" URL string // "https://github.com/jychri/git-in-sync" PendingClone bool // true if RepoPath or GitPath are empty Verified bool // true if Repo continues to pass verification ErrorMessage string // the last error message ErrorName string // name of the last error ErrorShort string // message in matched short form Cloned bool // true if Repo was cloned OriginURL string // "https://github.com/jychri/git-in-sync" LocalBranch string // `git rev-parse --abbrev-ref HEAD`, "master" LocalSHA string // `git rev-parse @`, "l00000ngSHA1slong324" UpstreamSHA string // `git rev-parse @{u}`, "l00000ngSHA1slong324" MergeSHA string // `git merge-base @ @{u}`, "l00000ngSHA1slong324" UpstreamBranch string // `git rev-parse --abbrev-ref --symbolic-full-name @{u}`, "..." DiffsNameOnly []string // `git diff --name-only @{u}`, [a, b, c, d, e] DiffsSummary string // "a, b, c..." ShortStat string // `git diff --shortstat`, "x files changed, y insertions(+), z deletions(-)" Changed int // count of changed files (x) Insertions int // count of inserted files (y) Deletions int // count of deleted files (z) ShortStatSummary string // "+y|-z" or "D" for Deleted if (x >= 1 && y == 0 && z == 0) Clean bool // true if Changed, Insertions and Deletions are all 0 Untracked bool // true if if len(r.UntrackedFiles) >= 1 UntrackedFiles []string // `git ls-files --others --exclude-standard`, [a, b, c, d, e] UntrackedSummary string // "a, b, c..." Category string // Complete, Pending, Skipped, Scheduled Status string // Complete is the last step Action string // Push, Pull, Add-Commit-Push etc. Prompt1 string // First prompt message Prompt2 string // Second prompt message Message string // Commit message }
Repo models a Git repository.
func (*Repo) GitConfigOriginURL ¶
func (r *Repo) GitConfigOriginURL()
GitConfigOriginURL gets the remote origin URL for a Repo.
func (*Repo) UserConfirm ¶
UserConfirm prompts the user with prompts Prompt1 and Prompt2 and records the response.
Click to show internal directories.
Click to hide internal directories.