summaryrefslogtreecommitdiff
path: root/t/t7300-clean.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-02-05 14:34:59 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-02-05 14:34:59 -0800
commit7ab963e1225ac8dc378142e8632b4dc94c25b351 (patch)
tree0b8d6b21d1a6d381ed096d78068b273cecce6937 /t/t7300-clean.sh
parentMerge branch 'bc/hash-independent-tests-part-7' (diff)
parentdir: point treat_leading_path() warning to the right place (diff)
downloadtgif-7ab963e1225ac8dc378142e8632b4dc94c25b351.tar.xz
Merge branch 'en/fill-directory-fixes-more'
Corner case bugs in "git clean" that stems from a (necessarily for performance reasons) awkward calling convention in the directory enumeration API has been corrected. * en/fill-directory-fixes-more: dir: point treat_leading_path() warning to the right place dir: restructure in a way to avoid passing around a struct dirent dir: treat_leading_path() and read_directory_recursive(), round 2 clean: demonstrate a bug with pathspecs
Diffstat (limited to 't/t7300-clean.sh')
-rwxr-xr-xt/t7300-clean.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
index 6e6d24c1c3..cb5e34d94c 100755
--- a/t/t7300-clean.sh
+++ b/t/t7300-clean.sh
@@ -737,4 +737,13 @@ test_expect_success MINGW 'handle clean & core.longpaths = false nicely' '
test_i18ngrep "too long" .git/err
'
+test_expect_success 'clean untracked paths by pathspec' '
+ git init untracked &&
+ mkdir untracked/dir &&
+ echo >untracked/dir/file.txt &&
+ git -C untracked clean -f dir/file.txt &&
+ ls untracked/dir >actual &&
+ test_must_be_empty actual
+'
+
test_done