revert(3p/git): Revert merge of git upstream at v2.26.2

This causes cgit to serve error pages, which is undesirable.

This reverts commit 5229c9b232, reversing
changes made to f2b211131f.
This commit is contained in:
Vincent Ambo 2020-05-26 00:06:52 +01:00
parent 6f8fbf4aa4
commit 93ba78d6f4
1006 changed files with 60537 additions and 148724 deletions

View file

@ -117,7 +117,6 @@ test_expect_success C_LOCALE_OUTPUT 'git clean with relative prefix' '
would_clean=$(
cd docs &&
git clean -n ../src |
grep part3 |
sed -n -e "s|^Would remove ||p"
) &&
verbose test "$would_clean" = ../src/part3.c
@ -130,7 +129,6 @@ test_expect_success C_LOCALE_OUTPUT 'git clean with absolute path' '
would_clean=$(
cd docs &&
git clean -n "$(pwd)/../src" |
grep part3 |
sed -n -e "s|^Would remove ||p"
) &&
verbose test "$would_clean" = ../src/part3.c
@ -549,7 +547,7 @@ test_expect_failure 'nested (non-empty) bare repositories should be cleaned even
test_path_is_missing strange_bare
'
test_expect_success 'giving path in nested git work tree will NOT remove it' '
test_expect_success 'giving path in nested git work tree will remove it' '
rm -fr repo &&
mkdir repo &&
(
@ -561,7 +559,7 @@ test_expect_success 'giving path in nested git work tree will NOT remove it' '
git clean -f -d repo/bar/baz &&
test_path_is_file repo/.git/HEAD &&
test_path_is_dir repo/bar/ &&
test_path_is_file repo/bar/baz/hello.world
test_path_is_missing repo/bar/baz
'
test_expect_success 'giving path to nested .git will not remove it' '
@ -579,7 +577,7 @@ test_expect_success 'giving path to nested .git will not remove it' '
test_path_is_dir untracked/
'
test_expect_success 'giving path to nested .git/ will NOT remove contents' '
test_expect_success 'giving path to nested .git/ will remove contents' '
rm -fr repo untracked &&
mkdir repo untracked &&
(
@ -589,7 +587,7 @@ test_expect_success 'giving path to nested .git/ will NOT remove contents' '
) &&
git clean -f -d repo/.git/ &&
test_path_is_dir repo/.git &&
test_path_is_file repo/.git/HEAD &&
test_dir_is_empty repo/.git &&
test_path_is_dir untracked/
'
@ -671,60 +669,6 @@ test_expect_success 'git clean -d skips untracked dirs containing ignored files'
test_path_is_missing foo/b/bb
'
test_expect_success 'git clean -d skips nested repo containing ignored files' '
test_when_finished "rm -rf nested-repo-with-ignored-file" &&
git init nested-repo-with-ignored-file &&
(
cd nested-repo-with-ignored-file &&
>file &&
git add file &&
git commit -m Initial &&
# This file is ignored by a .gitignore rule in the outer repo
# added in the previous test.
>ignoreme
) &&
git clean -fd &&
test_path_is_file nested-repo-with-ignored-file/.git/index &&
test_path_is_file nested-repo-with-ignored-file/ignoreme &&
test_path_is_file nested-repo-with-ignored-file/file
'
test_expect_success 'git clean handles being told what to clean' '
mkdir -p d1 d2 &&
touch d1/ut d2/ut &&
git clean -f */ut &&
test_path_is_missing d1/ut &&
test_path_is_missing d2/ut
'
test_expect_success 'git clean handles being told what to clean, with -d' '
mkdir -p d1 d2 &&
touch d1/ut d2/ut &&
git clean -ffd */ut &&
test_path_is_missing d1/ut &&
test_path_is_missing d2/ut
'
test_expect_success 'git clean works if a glob is passed without -d' '
mkdir -p d1 d2 &&
touch d1/ut d2/ut &&
git clean -f "*ut" &&
test_path_is_missing d1/ut &&
test_path_is_missing d2/ut
'
test_expect_success 'git clean works if a glob is passed with -d' '
mkdir -p d1 d2 &&
touch d1/ut d2/ut &&
git clean -ffd "*ut" &&
test_path_is_missing d1/ut &&
test_path_is_missing d2/ut
'
test_expect_success MINGW 'handle clean & core.longpaths = false nicely' '
test_config core.longpaths false &&
a50=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &&
@ -737,13 +681,4 @@ 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