3 # Copyright (c) 2007 Johannes E. Schindelin
6 test_description
='Test commit notes index (expensive!)'
8 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
=main
9 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
19 while test $nr -lt $number_of_commits
26 commit refs/heads/main
28 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
45 echo "N :$notemark :$mark" >>note_commit
49 commit refs/notes/commits
50 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
59 git fast-import
--quiet &&
60 git config core.notesRef refs
/notes
/commits
66 git config core.notesRef refs
/notes
/commits
&&
68 grep "^ " tmp
>output
&&
73 echo " note for commit #$i" &&
76 test_cmp expect output
79 write_script time_notes
<<\EOF
86 GIT_NOTES_REF
=non-existing
99 for mode
in no-notes notes
102 /usr
/bin
/time ..
/time_notes
$mode $1
109 test_expect_success
$pr "setup $count" '
117 test_expect_success
$pr 'notes work' '
124 test_expect_success
"USR_BIN_TIME${pr:+,$pr}" 'notes timing with /usr/bin/time' '
133 for count
in 100 1000 10000
135 do_tests
"$count" EXPENSIVE