Rearrange order of checks in shouldPresentUpdate, so that highest level reasons are checked and returned first.
This eliminates poor skip reasons that cause user to play whack-a-mole. There's no point in trying to fix the locally checked out branch first, if the remote repository is completely wrong.
Fixes #74 (again).
Updates #73.
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 branch "v4" doesn't match remote branch "master"
After
$ Go-Package-Store
Using all Go packages in GOPATH.
Go Package Store server is running at http://localhost:7043/index.html.
skipping "gopkg.in/src-d/go-git.v4" because:
remote URL doesn't match repo URL inferred from import path:
(actual) https://github.com/mvdan/go-git
(expected) https://gopkg.in/src-d/go-git.v4
Rearrange order of checks in
shouldPresentUpdate
, so that highest level reasons are checked and returned first.This eliminates poor skip reasons that cause user to play whack-a-mole. There's no point in trying to fix the locally checked out branch first, if the remote repository is completely wrong.
Fixes #74 (again). Updates #73.
Before
After
/cc @mvdan FYI.