On Sun, 1 Oct 2017, Thomas Gummerer wrote: > On 09/29, Robert P. J. Day wrote: > > > > from the man page: > > > > "If the --include-untracked option is used, all untracked files > > are also stashed and then cleaned up with git clean, leaving the > > working directory in a very clean state. If the --all option is > > used instead > > > > ^^^^^^^ then the ignored files are stashed and cleaned in addition > > to the untracked files." > > > > the use of the word "instead" suggests you can use one of those > > options, or the other, but not both at the same time. but it seems > > you can combine them, so that paragraph seems a bit misleading, > > no? > > Looking at the code, really only one (the last one that's specified > on the command line) is respected, so I think the man page is > correct. This happens silently, where I guess your impression that > it's possible to combine them comes from. > > This is fine when --include-untracked is specified first, as --all > implies --include-untracked, but I guess the behaviour could be a > bit surprising if --all is specified first and --include-untracked > later on the command line. > > Changing this could possibly break someone that just adds parameters > to their 'git stash' invocation, but I'm tempted to say allowing > both at once is a bug, and change it to make git die when both are > specified. Do you have any inserest in submitting a patch that > fixes this? :) sure, might as well jump in with both feet. is there another example in the code of mutually exclusive options so i can just steal the error code? rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ========================================================================