glock
glock copied to clipboard
glock should detect uncommitted changes
Presently glock only reads the currently checked-out commit, and it reports [OK] if there are uncommitted changes. Instead, it should report uncommitted changes as an error that the user should resolve
Does this capability also apply to all dependencies? If a dependency isn't in a clean state then it's even worse than the main repo because it's out of sight and harder to detect.
Yeah, I meant dependencies, not the main repo. (Frequently the main repo is dirty with in-progress changes)
It makes sense for glock
to do that. It would be inaccurate to save a dependency as a given revision when it has a dirty working tree - resulting in a non-reproducible build for others being potentially pushed.
It's basically the equivalent of using gostatus in the following way:
# Legend:
# b - Non-master branch checked out
# * - Uncommited changes in working dir
# Show status of all dependencies (recursive) of package in cur working dir.
go list -f '{{join .Deps "\n"}}' . | gostatus --all
And making sure none of the dependencies have b
(non-master branch checked out) or *
(dirty working tree) status.
gostatus
uses this vcs
package to figure that out.
Also, FWIW, godep
already had this functionality - it wouldn't let you do godep save --copy=false
if one of the dependencies had a dirty working tree.
Very cool, thanks for the links