-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Git clean with -e without it's parameter and --dry-run right after it, is hot, it runs for real instead of aborting #1812
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
Comments
I'm not sure that the command is correct. The Maybe you wanted |
space between the -e and the (text in angle brackets got lost!) |
@PhilipOakley Sure, it's not suppose to be valid, sorry for not explaining the context in more detail, it's kind of a beginner case here, it probably isn't usual to experienced git users, but I reported what I found. I just landed on it by accident, I was in a bit of a rush getting things fixed, since -dfX wouldn't give me the correct behavior for my case, i just started using other subcomands. I first tried the -x and then e at the end of -df, I didn't try first without any subcomands, it's it was kinda backwards. I suspect I would have got to the intended clean behavior and wouldn't have got to discovering this issue otherwise, so it's not the -e option that made it work, I later realized. Indeed it's probably consuming the --dry-run as a pattern, or consuming it but also nulling it completely, who knows what haywire is going on under the hood, the effect it has is pretty much the worst case scenario. I'm not sure if it's an actual bug, undocumented behavior, but it surely isn't the most optimal behavior, so even if it is the users fault, I'd say a fix is justified because of the consequence it has, actually running things when the user expressly specifies a dry run. If you guys don't agree or it doesn't fall into any of critera just do what you think it's best or whatever policy git has for such cases.
|
@Zexaron Thanks for coming back with the explanation. I hope my answer helped. There is also a google-groups 'git users' / Git for Humans list which offers some help without the need to log an issue for the developers (though in this case it was a reasonable misunderstanding). Is it OK to close the issue now? [I've closed it, but you can re-open / reply if needed] |
Yeah, I figured it's something git core has to fix, probably not a GFW problem, stuff like bug reports about git it self go through the mailing list and other ways right ? |
The main git folk will probably say 'works as designed' (which unfortunately it is). An alternate route is to consider how the manual could be improved, such as a short terse phrase at the right place that would help pull folks up short to notice this potential 'gotcha'. Personally I'm very supportive of more user friendly manuals (as compared to expert friendly). The main git list is at [email protected] but will reject any email containing HTML - so it is plain text all the way! The mailing list archives are available at https://public-inbox.org/git/, http://marc.info/?l=git and other archival sites. |
has to? LOL... While I understand that sentiment, you will find it extremely difficult to assign work to volunteers in this manner ;-) Which will leave you only two options: fix things yourself, or live with the status quo. |
Referr to #1811 for other base setup and details information.
Minimal, Complete, and Verifiable example
this will help us understand the issue.
Output messages showing what would be done.
Output messages showing what was just done.
The text was updated successfully, but these errors were encountered: