t5306-pack-nobase: modernize test format
Some tests still use the old format with four spaces indentation. Standardize the tests to the new format with tab indentation. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@ -12,9 +12,8 @@ TEST_PASSES_SANITIZE_LEAK=true
|
|||||||
|
|
||||||
# Create A-B chain
|
# Create A-B chain
|
||||||
#
|
#
|
||||||
test_expect_success \
|
test_expect_success 'setup base' '
|
||||||
'setup base' \
|
test_write_lines a b c d e f g h i >text &&
|
||||||
'test_write_lines a b c d e f g h i >text &&
|
|
||||||
echo side >side &&
|
echo side >side &&
|
||||||
git update-index --add text side &&
|
git update-index --add text side &&
|
||||||
A=$(echo A | git commit-tree $(git write-tree)) &&
|
A=$(echo A | git commit-tree $(git write-tree)) &&
|
||||||
@ -23,7 +22,7 @@ test_expect_success \
|
|||||||
git update-index text &&
|
git update-index text &&
|
||||||
B=$(echo B | git commit-tree $(git write-tree) -p $A) &&
|
B=$(echo B | git commit-tree $(git write-tree) -p $A) &&
|
||||||
git update-ref HEAD $B
|
git update-ref HEAD $B
|
||||||
'
|
'
|
||||||
|
|
||||||
# Create repository with C whose parent is B.
|
# Create repository with C whose parent is B.
|
||||||
# Repository contains C, C^{tree}, C:text, B, B^{tree}.
|
# Repository contains C, C^{tree}, C:text, B, B^{tree}.
|
||||||
@ -31,9 +30,8 @@ test_expect_success \
|
|||||||
# Repository is missing A (parent of B).
|
# Repository is missing A (parent of B).
|
||||||
# Repository is missing A:side.
|
# Repository is missing A:side.
|
||||||
#
|
#
|
||||||
test_expect_success \
|
test_expect_success 'setup patch_clone' '
|
||||||
'setup patch_clone' \
|
base_objects=$(pwd)/.git/objects &&
|
||||||
'base_objects=$(pwd)/.git/objects &&
|
|
||||||
(mkdir patch_clone &&
|
(mkdir patch_clone &&
|
||||||
cd patch_clone &&
|
cd patch_clone &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -51,13 +49,12 @@ test_expect_success \
|
|||||||
git hash-object -t tree -w --stdin
|
git hash-object -t tree -w --stdin
|
||||||
) &&
|
) &&
|
||||||
C=$(git --git-dir=patch_clone/.git rev-parse HEAD)
|
C=$(git --git-dir=patch_clone/.git rev-parse HEAD)
|
||||||
'
|
'
|
||||||
|
|
||||||
# Clone patch_clone indirectly by cloning base and fetching.
|
# Clone patch_clone indirectly by cloning base and fetching.
|
||||||
#
|
#
|
||||||
test_expect_success \
|
test_expect_success 'indirectly clone patch_clone' '
|
||||||
'indirectly clone patch_clone' \
|
(mkdir user_clone &&
|
||||||
'(mkdir user_clone &&
|
|
||||||
cd user_clone &&
|
cd user_clone &&
|
||||||
git init &&
|
git init &&
|
||||||
git pull ../.git &&
|
git pull ../.git &&
|
||||||
@ -66,17 +63,16 @@ test_expect_success \
|
|||||||
git pull ../patch_clone/.git &&
|
git pull ../patch_clone/.git &&
|
||||||
test $(git rev-parse HEAD) = $C
|
test $(git rev-parse HEAD) = $C
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
# Cloning the patch_clone directly should fail.
|
# Cloning the patch_clone directly should fail.
|
||||||
#
|
#
|
||||||
test_expect_success \
|
test_expect_success 'clone of patch_clone is incomplete' '
|
||||||
'clone of patch_clone is incomplete' \
|
(mkdir user_direct &&
|
||||||
'(mkdir user_direct &&
|
|
||||||
cd user_direct &&
|
cd user_direct &&
|
||||||
git init &&
|
git init &&
|
||||||
test_must_fail git fetch ../patch_clone/.git
|
test_must_fail git fetch ../patch_clone/.git
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
Reference in New Issue
Block a user