diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-02-14 12:42:31 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-02-14 12:42:31 -0800 |
commit | 1f7609b520ef7ffe8ca6ac5f8361b98755f742d1 (patch) | |
tree | 27b887e963f21a0c7e840cfef8a01c749b50ce1d /t | |
parent | Merge branch 'bc/misconception-doc' into maint (diff) | |
parent | dir: point treat_leading_path() warning to the right place (diff) | |
download | tgif-1f7609b520ef7ffe8ca6ac5f8361b98755f742d1.tar.xz |
Merge branch 'en/fill-directory-fixes-more' into maint
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')
-rwxr-xr-x | t/t7300-clean.sh | 9 |
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 |