-
Notifications
You must be signed in to change notification settings - Fork 110
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
UX: If a clean repo is dirty after a failed run, give clean-up hints #6112
Conversation
Codecov Report
@@ Coverage Diff @@
## maint #6112 +/- ##
==========================================
- Coverage 90.23% 87.80% -2.43%
==========================================
Files 312 312
Lines 42219 42274 +55
==========================================
- Hits 38095 37120 -975
- Misses 4124 5154 +1030
Continue to review full report at Codecov.
|
I know this is more about the issue you are trying to address than the PR itself, but: That particular hint kind scares me! How can we possibly know whether it's okay to run Rationale for suggesting those particular commands, @yarikoptic? |
This is an implementation of datalad#2924. In case where a run command failed in a formerly clean repo, and the repo is left in a dirty state, log general hints to use 'git clean' and 'git reset' at INFO level
I agree to Ben's notion that this could be dangerous, and the |
For completeness, a reproducer of undesired behavior:
|
I think pointing to |
It could become a more general hint. I struggle to find a short message*, but maybe sth like "The command failure may have left unintentional clutter behind. The commands 'git reset' and/or 'git clean' could be used to reset the dataset into a clean state again. Consult their man pages for more information"
|
Yes, I'd like something like this much better, than suggesting any particular thing to run that may or may not have side-effects under some circumstances. |
;-) because they are the commands (well, ok -- may be |
Good, so we can likely agree on a wording that is a little less suggestive of blindly c&p'ing what datalad said. That's why I like @adswa's wording to point to the commands, but rather than saying "run this", "check this". For the same reason (A full command given with a statement like "run this to achieve that"), I'd also not suggest |
I have reworded the message to be a bit more careful |
any opinions on this? We can vote:
|
Generally fine with that, but if we are to suggest concrete command options for the "usual/general" case, make it either So, my vote is on |
Waiting for @bpoldrack to put conclusion into #6114, such that compliance of this PR can be evaluated |
FTR: Wrote down the idea in #6114, but I don't think it makes sense to wait for an actual implementation. So, apart from my preference for minimal rewording, can be merged from my POV. |
f3e2149
to
4a97867
Compare
This is an implementation of #2924.
In case where a run command failed in a formerly clean repo, and the repo is
left in a dirty state, log general hints to use 'git clean' and 'git reset'
at INFO level.
Closes #2924.