mirror of
https://github.com/grdl/git-get.git
synced 2026-02-08 18:04:18 +00:00
Add Fetch function and test repo being behind upstream
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
type RepoStatus struct {
|
||||
HasUntrackedFiles bool
|
||||
HasUncommittedChanges bool
|
||||
BranchStatuses []BranchStatus
|
||||
BranchStatuses map[string]BranchStatus
|
||||
}
|
||||
|
||||
func NewRepoStatus(path string) (RepoStatus, error) {
|
||||
@@ -33,6 +33,12 @@ func NewRepoStatus(path string) (RepoStatus, error) {
|
||||
}
|
||||
}
|
||||
|
||||
branchStatuses, err := Branches(repo)
|
||||
if err != nil {
|
||||
return status, errors.Wrap(err, "Failed getting branches statuses")
|
||||
}
|
||||
status.BranchStatuses = branchStatuses
|
||||
|
||||
return status, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user