6
0
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:
Grzegorz Dlugoszewski
2020-05-19 21:25:06 +02:00
parent 307b2cd4a2
commit 4b8b1d52f0
4 changed files with 76 additions and 7 deletions

View File

@@ -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
}