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
11 TEST_PASSES_SANITIZE_LEAK
=true
20 while test $nr -lt $number_of_commits
27 commit refs/heads/main
29 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
46 echo "N :$notemark :$mark" >>note_commit
50 commit refs/notes/commits
51 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
60 git fast-import
--quiet &&
61 git config core.notesRef refs
/notes
/commits
67 git config core.notesRef refs
/notes
/commits
&&
69 grep "^ " tmp
>output
&&
74 echo " note for commit #$i" &&
77 test_cmp expect output
80 write_script time_notes
<<\EOF
87 GIT_NOTES_REF
=non-existing
100 for mode
in no-notes notes
103 /usr
/bin
/time ..
/time_notes
$mode $1
110 test_expect_success
$pr "setup $count" '
118 test_expect_success
$pr 'notes work' '
125 test_expect_success
"USR_BIN_TIME${pr:+,$pr}" 'notes timing with /usr/bin/time' '
134 for count
in 100 1000 10000
136 do_tests
"$count" EXPENSIVE