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
&&
68 git log |
grep "^ " >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