mirror of
https://github.com/git/git
synced 2024-11-05 18:59:29 +00:00
93e02b6e1e
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>
20 lines
450 B
Bash
Executable file
20 lines
450 B
Bash
Executable file
#!/bin/sh
|
|
|
|
test_description='git annotate'
|
|
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
|
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
|
|
|
TEST_CREATE_REPO_NO_TEMPLATE=1
|
|
. ./test-lib.sh
|
|
|
|
PROG='git annotate'
|
|
. "$TEST_DIRECTORY"/annotate-tests.sh
|
|
|
|
test_expect_success 'annotate old revision' '
|
|
git annotate file main >actual &&
|
|
awk "{ print \$3; }" <actual >authors &&
|
|
test 2 = $(grep A <authors | wc -l) &&
|
|
test 2 = $(grep B <authors | wc -l)
|
|
'
|
|
|
|
test_done
|