summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-07-29 12:38:16 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-07-29 12:38:16 -0700
commit17952bd1bf4d758c5431eafe06059193c3977881 (patch)
treeb401581e766db96f1f0ee39ca9f08e4f78ff9b5c /t
parentMerge branch 'es/local-atomic-push-failure-with-http' into maint (diff)
parentclean: show an error message when the path is too long (diff)
downloadtgif-17952bd1bf4d758c5431eafe06059193c3977881.tar.xz
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 7b36954d63..a2c45d1902 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