author | Brandon Casey <drafnel@gmail.com> | |
Sat, 27 Aug 2011 00:59:27 +0000 (19:59 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 27 Aug 2011 18:12:18 +0000 (11:12 -0700) | ||
commit | 7474b8b452f2600bd2a9e03f67b83b489aeadb37 | |
tree | fc97c152850004f775335e3bd4a82f1110fd350f | tree | snapshot |
parent | c995ef49e2a3076236d8fc710cc2015f5ff201c5 | commit | diff |
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 <hilco.wijbenga@gmail.com>
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 <hilco.wijbenga@gmail.com>
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-stash.sh | diff | blob | history | |
t/t3905-stash-include-untracked.sh | diff | blob | history |