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 &&
67 git log | grep "^ " >output &&
72 echo " note for commit #$i" &&
75 test_cmp expect output
78 write_script time_notes <<\EOF
85 GIT_NOTES_REF=non-existing
98 for mode in no-notes notes
101 /usr/bin/time ../time_notes $mode $1
108 test_expect_success $pr "setup $count" '
116 test_expect_success $pr 'notes work' '
123 test_expect_success "USR_BIN_TIME${pr:+,$pr}" 'notes timing with /usr/bin/time' '
132 for count in 100 1000 10000
134 do_tests "$count" EXPENSIVE