Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glock should detect uncommitted changes #9

Open
robfig opened this issue Sep 13, 2014 · 4 comments
Open

glock should detect uncommitted changes #9

robfig opened this issue Sep 13, 2014 · 4 comments

Comments

@robfig
Copy link
Owner

robfig commented Sep 13, 2014

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

@joliver
Copy link

joliver commented Sep 14, 2014

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.

@robfig
Copy link
Owner Author

robfig commented Sep 14, 2014

Yeah, I meant dependencies, not the main repo. (Frequently the main repo is dirty with in-progress changes)

@dmitshur
Copy link

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.

@robfig
Copy link
Owner Author

robfig commented Sep 14, 2014

Very cool, thanks for the links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants