From d88acc91785661ef261ed816c13b70068400d194 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Fri, 26 Aug 2011 19:59:25 -0500 Subject: git-stash.sh: fix typo in error message Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- git-stash.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-stash.sh') diff --git a/git-stash.sh b/git-stash.sh index 7ffab6f26f..0d167fcdf6 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -199,7 +199,7 @@ save_stash () { if test -n "$patch_mode" && test -n "$untracked" then - die "Can't use --patch and ---include-untracked or --all at the same time" + die "Can't use --patch and --include-untracked or --all at the same time" fi stash_msg="$*" -- cgit v1.2.3 From 7474b8b452f2600bd2a9e03f67b83b489aeadb37 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Fri, 26 Aug 2011 19:59:27 -0500 Subject: git-stash: remove untracked/ignored directories when stashed The two new stash options --include-untracked and --all do not remove the untracked and/or ignored files that are stashed if those files reside in a subdirectory. e.g. the following sequence fails: mkdir untracked && echo hello >untracked/file.txt && git stash --include-untracked && test ! -f untracked/file.txt Within the git-stash script, git-clean is used to remove the untracked/ignored files, but since the -d option was not supplied, it does not remove directories. So, add -d to the git-clean arguments, and update the tests to test this functionality. Reported-by: Hilco Wijbenga Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- git-stash.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-stash.sh') diff --git a/git-stash.sh b/git-stash.sh index 0d167fcdf6..3157917230 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -228,7 +228,7 @@ save_stash () { test "$untracked" = "all" && CLEAN_X_OPTION=-x || CLEAN_X_OPTION= if test -n "$untracked" then - git clean --force --quiet $CLEAN_X_OPTION + git clean --force --quiet -d $CLEAN_X_OPTION fi if test "$keep_index" = "t" && test -n $i_tree -- cgit v1.2.3