On 03/21, Thomas Gummerer wrote: > > Argh I just noticed we could drop the "$@" here, as this is no longer > the pathspec case. It doesn't hurt anything, except it may be a bit > confusing when reading the code. > > Although if we end up implementing 'git checkout --index <pathspec>', > we'd have to add it back, but we do have a test covering this case, so > there's no worries about forgetting to add it back. Here's a patch for that. Not sure it's worth doing, but since we're already touching the area, this may be a good cleanup. This is based on top of tg/stash-untracked-with-pathspec-fix. --- >8 --- Subject: [PATCH] stash: drop superfluos pathspec parameter Since 833622a945 ("stash push: avoid printing errors", 2018-03-19) we don't use the 'git clean' call for the pathspec case anymore. The commit however forgot to remove the pathspec argument to the call. Remove the superfluos argument to make the code a little more obvious. Signed-off-by: Thomas Gummerer <t.gummerer@xxxxxxxxx> --- git-stash.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-stash.sh b/git-stash.sh index 4e55f278bd..d31924aea3 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -310,7 +310,7 @@ push_stash () { test "$untracked" = "all" && CLEAN_X_OPTION=-x || CLEAN_X_OPTION= if test -n "$untracked" && test $# = 0 then - git clean --force --quiet -d $CLEAN_X_OPTION -- "$@" + git clean --force --quiet -d $CLEAN_X_OPTION fi if test $# != 0 -- 2.15.1.33.g3165b24a68