зеркало из https://github.com/microsoft/git.git
t5000: reformat indentation to the latest fashion
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
0218ad5d5c
Коммит
9c8e7e968c
|
@ -111,25 +111,34 @@ test_expect_success 'setup' '
|
||||||
EOF
|
EOF
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success 'populate workdir' '
|
||||||
'populate workdir' \
|
mkdir a &&
|
||||||
'mkdir a &&
|
|
||||||
echo simple textfile >a/a &&
|
echo simple textfile >a/a &&
|
||||||
ten=0123456789 && hundred=$ten$ten$ten$ten$ten$ten$ten$ten$ten$ten &&
|
ten=0123456789 &&
|
||||||
echo long filename >a/four$hundred &&
|
hundred="$ten$ten$ten$ten$ten$ten$ten$ten$ten$ten" &&
|
||||||
|
echo long filename >"a/four$hundred" &&
|
||||||
mkdir a/bin &&
|
mkdir a/bin &&
|
||||||
test-tool genrandom "frotz" 500000 >a/bin/sh &&
|
test-tool genrandom "frotz" 500000 >a/bin/sh &&
|
||||||
printf "A\$Format:%s\$O" "$SUBSTFORMAT" >a/substfile1 &&
|
printf "A\$Format:%s\$O" "$SUBSTFORMAT" >a/substfile1 &&
|
||||||
printf "A not substituted O" >a/substfile2 &&
|
printf "A not substituted O" >a/substfile2 &&
|
||||||
if test_have_prereq SYMLINKS; then
|
if test_have_prereq SYMLINKS
|
||||||
|
then
|
||||||
ln -s a a/l1
|
ln -s a a/l1
|
||||||
else
|
else
|
||||||
printf %s a > a/l1
|
printf %s a >a/l1
|
||||||
fi &&
|
fi &&
|
||||||
(p=long_path_to_a_file && cd a &&
|
(
|
||||||
for depth in 1 2 3 4 5; do mkdir $p && cd $p; done &&
|
p=long_path_to_a_file &&
|
||||||
echo text >file_with_long_path) &&
|
cd a &&
|
||||||
(cd a && find .) | sort >a.lst'
|
for depth in 1 2 3 4 5
|
||||||
|
do
|
||||||
|
mkdir $p &&
|
||||||
|
cd $p
|
||||||
|
done &&
|
||||||
|
echo text >file_with_long_path
|
||||||
|
) &&
|
||||||
|
(cd a && find .) | sort >a.lst
|
||||||
|
'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
'add ignored file' \
|
'add ignored file' \
|
||||||
|
@ -147,18 +156,18 @@ test_expect_success 'setup export-subst' '
|
||||||
>a/substfile1
|
>a/substfile1
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success 'create bare clone' '
|
||||||
'create bare clone' \
|
git clone --bare . bare.git &&
|
||||||
'git clone --bare . bare.git &&
|
cp .git/info/attributes bare.git/info/attributes
|
||||||
cp .git/info/attributes bare.git/info/attributes'
|
'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success 'remove ignored file' '
|
||||||
'remove ignored file' \
|
rm a/ignored
|
||||||
'rm a/ignored'
|
'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success 'git archive' '
|
||||||
'git archive' \
|
git archive HEAD >b.tar
|
||||||
'git archive HEAD >b.tar'
|
'
|
||||||
|
|
||||||
check_tar b
|
check_tar b
|
||||||
|
|
||||||
|
@ -199,21 +208,23 @@ test_expect_success 'git archive on large files' '
|
||||||
test_cmp_bin b.tar b3.tar
|
test_cmp_bin b.tar b3.tar
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success 'git archive in a bare repo' '
|
||||||
'git archive in a bare repo' \
|
git --git-dir bare.git archive HEAD >b3.tar
|
||||||
'(cd bare.git && git archive HEAD) >b3.tar'
|
'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success 'git archive vs. the same in a bare repo' '
|
||||||
'git archive vs. the same in a bare repo' \
|
test_cmp_bin b.tar b3.tar
|
||||||
'test_cmp_bin b.tar b3.tar'
|
'
|
||||||
|
|
||||||
test_expect_success 'git archive with --output' \
|
test_expect_success 'git archive with --output' '
|
||||||
'git archive --output=b4.tar HEAD &&
|
git archive --output=b4.tar HEAD &&
|
||||||
test_cmp_bin b.tar b4.tar'
|
test_cmp_bin b.tar b4.tar
|
||||||
|
'
|
||||||
|
|
||||||
test_expect_success 'git archive --remote' \
|
test_expect_success 'git archive --remote' '
|
||||||
'git archive --remote=. HEAD >b5.tar &&
|
git archive --remote=. HEAD >b5.tar &&
|
||||||
test_cmp_bin b.tar b5.tar'
|
test_cmp_bin b.tar b5.tar
|
||||||
|
'
|
||||||
|
|
||||||
test_expect_success 'git archive --remote with configured remote' '
|
test_expect_success 'git archive --remote with configured remote' '
|
||||||
git config remote.foo.url . &&
|
git config remote.foo.url . &&
|
||||||
|
@ -224,13 +235,13 @@ test_expect_success 'git archive --remote with configured remote' '
|
||||||
test_cmp_bin b.tar b5-nick.tar
|
test_cmp_bin b.tar b5-nick.tar
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success 'validate file modification time' '
|
||||||
'validate file modification time' \
|
mkdir extract &&
|
||||||
'mkdir extract &&
|
|
||||||
"$TAR" xf b.tar -C extract a/a &&
|
"$TAR" xf b.tar -C extract a/a &&
|
||||||
test-tool chmtime --get extract/a/a >b.mtime &&
|
test-tool chmtime --get extract/a/a >b.mtime &&
|
||||||
echo "1117231200" >expected.mtime &&
|
echo "1117231200" >expected.mtime &&
|
||||||
test_cmp expected.mtime b.mtime'
|
test_cmp expected.mtime b.mtime
|
||||||
|
'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
'git get-tar-commit-id' \
|
'git get-tar-commit-id' \
|
||||||
|
|
Загрузка…
Ссылка в новой задаче