Thread (1 message) 1 message, 1 author, 2018-03-21

Re: [PATCH v5 2/3] stash push: avoid printing errors

From: Junio C Hamano <hidden>
Date: 2018-03-21 21:56:48

Thomas Gummerer [off-list ref] writes:
quoted
quoted
diff --git a/git-stash.sh b/git-stash.sh
index 4c92ec931f..5e06f96da5 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -308,14 +308,16 @@ push_stash () {
 	if test -z "$patch_mode"
 	then
 		test "$untracked" = "all" && CLEAN_X_OPTION=-x || CLEAN_X_OPTION=
-		if test -n "$untracked"
+		if test -n "$untracked" && test $# = 0
 		then
 			git clean --force --quiet -d $CLEAN_X_OPTION -- "$@"
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.
Yes, we could, but we do not have to.  I think it is fine to leave
it in especially if we envision that the codepaths for two cases
will be unified in the future.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help