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

More descriptive error message for checking out a snap with uncommitted files in git #67

Open
Drake-Eidukas opened this issue Feb 8, 2019 · 1 comment
Labels
refactor This isn't super important, but would be nice to refactor

Comments

@Drake-Eidukas
Copy link
Contributor

Drake-Eidukas commented Feb 8, 2019

So, for fun, I made a file and marked it, then deleted it. I also manually edited the .cfg.json to see what that was all about.

Currently, the error message is just:

drake@element:~/workspace/test_base$ cfg snap checkout master
error: there are uncommitted files
'git status -s' output:
 M .cfg.json
D  .cfg_schemas/lol
 D lol/hh/lol.yaml

I think that the error message seems somewhat... barebones. Could be nice to update this to be more consistent with cfg / suggest how to fix the issues with modified / deleted, but it just feels weird to show a git message here.

@Drake-Eidukas
Copy link
Contributor Author

One suggestion I have is to provide a cfg reset command, which resets files tracked by cfg to the state they were in at the last successful git commit hash generated by cfg, and provide a help text in this case that shows how to run that command to fix the state of the base.

@Drake-Eidukas Drake-Eidukas added the refactor This isn't super important, but would be nice to refactor label Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor This isn't super important, but would be nice to refactor
Projects
None yet
Development

No branches or pull requests

1 participant