3 # Copyright (c) 2007 Johannes E. Schindelin
6 test_description='Test commit notes index (expensive!)'
10 test -z "$GIT_NOTES_TIMING_TESTS" && {
11 say Skipping timing tests
22 while [ $nr -lt $number_of_commits ]; do
28 commit refs/heads/master
30 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
48 echo "N :$notemark :$mark" >> note_commit
52 commit refs/notes/commits
53 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
62 git fast-import --quiet &&
63 git config core.notesRef refs/notes/commits
69 git config core.notesRef refs/notes/commits &&
70 git log | grep "^ " > output &&
72 while [ $i -gt 0 ]; do
74 echo " note for commit #$i" &&
77 test_cmp expect output
80 cat > time_notes << \EOF
83 while [ $i -lt $2 ]; do
86 GIT_NOTES_REF=non-existing; export GIT_NOTES_REF
98 for mode in no-notes notes
101 /usr/bin/time sh ../time_notes $mode $1
105 for count in 10 100 1000 10000; do
110 test_expect_success "setup $count" "create_repo $count"
112 test_expect_success 'notes work' "test_notes $count"
114 test_expect_success 'notes timing' "time_notes 100"