We want to check if local branch doesn't match default (as determined
from remote) branch before we check if local revision is empty. This
way, we can report a better error message in a case where the default
branch doesn't exist locally.
Add a sanity check to ensure Remote.Branch is not empty. It's not
expected to be. For consistency with Remote.Revision being empty check.
Fixes #74.
Before
$ Go-Package-Store
Using all Go packages in GOPATH.
Go Package Store server is running at http://localhost:7043/updates.
skipping "gopkg.in/src-d/go-git.v4" because:
local revision is empty
After
$ Go-Package-Store
Using all Go packages in GOPATH.
Go Package Store server is running at http://localhost:7043/updates.
skipping "gopkg.in/src-d/go-git.v4" because:
local branch "v4" doesn't match remote branch "master"
We want to check if local branch doesn't match default (as determined from remote) branch before we check if local revision is empty. This way, we can report a better error message in a case where the default branch doesn't exist locally.
Add a sanity check to ensure Remote.Branch is not empty. It's not expected to be. For consistency with Remote.Revision being empty check.
Fixes #74.
Before
After
/cc @mvdan FYI.