tests: don't assume a .git/info for .git/info/grafts
Change those tests that assumed that a .git/info directory would be created for them when writing .git/info/grafts to explicitly create the directory. Do this using the new "TEST_CREATE_REPO_NO_TEMPLATE" facility, and use "mkdir" instead of "mkdir -p" to assert that we don't have the .git/info already. An exception to this is the "with grafts" test in "t6001-rev-list-graft.sh". There we're modifying our ".git" state in a for-loop, in lieu of refactoring that more extensively let's use "mkdir -p" there. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
e942292a3e
commit
93e02b6e1e
@ -149,7 +149,7 @@ test_expect_success 'blame evil merge' '
|
||||
|
||||
test_expect_success 'blame huge graft' '
|
||||
test_when_finished "git checkout branch2" &&
|
||||
test_when_finished "rm -f .git/info/grafts" &&
|
||||
test_when_finished "rm -rf .git/info" &&
|
||||
graft= &&
|
||||
for i in 0 1 2
|
||||
do
|
||||
@ -164,6 +164,7 @@ test_expect_success 'blame huge graft' '
|
||||
graft="$graft$commit " || return 1
|
||||
done
|
||||
done &&
|
||||
mkdir .git/info &&
|
||||
printf "%s " $graft >.git/info/grafts &&
|
||||
check_count -h 00 01 1 10 1
|
||||
'
|
||||
|
Reference in New Issue
Block a user