summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-07-29 19:38:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-07-29 19:38:16 (GMT)
commit17952bd1bf4d758c5431eafe06059193c3977881 (patch)
treeb401581e766db96f1f0ee39ca9f08e4f78ff9b5c /t
parent1a27b78e34e9d9685f6bd55e80b8199f4874ad11 (diff)
parentb09364c47a015dee7735fd2c038d7d710417c2f2 (diff)
downloadgit-17952bd1bf4d758c5431eafe06059193c3977881.zip
git-17952bd1bf4d758c5431eafe06059193c3977881.tar.gz
git-17952bd1bf4d758c5431eafe06059193c3977881.tar.bz2
Merge branch 'js/clean-report-too-long-a-path' into maint
"git clean" silently skipped a path when it cannot lstat() it; now it gives a warning. * js/clean-report-too-long-a-path: clean: show an error message when the path is too long
Diffstat (limited to 't')
-rwxr-xr-xt/t7300-clean.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
index 7b36954..a2c45d1 100755
--- a/t/t7300-clean.sh
+++ b/t/t7300-clean.sh
@@ -669,4 +669,16 @@ test_expect_success 'git clean -d skips untracked dirs containing ignored files'
test_path_is_missing foo/b/bb
'
+test_expect_success MINGW 'handle clean & core.longpaths = false nicely' '
+ test_config core.longpaths false &&
+ a50=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &&
+ mkdir -p $a50$a50/$a50$a50/$a50$a50 &&
+ : >"$a50$a50/test.txt" 2>"$a50$a50/$a50$a50/$a50$a50/test.txt" &&
+ # create a temporary outside the working tree to hide from "git clean"
+ test_must_fail git clean -xdf 2>.git/err &&
+ # grepping for a strerror string is unportable but it is OK here with
+ # MINGW prereq
+ test_i18ngrep "too long" .git/err
+'
+
test_done