| # Helper functions for testing commit-graphs. |
| # Initialize OID cache with oid_version |
| git -c core.commitGraph=true $1 >output && |
| git -c core.commitGraph=false $1 >expect && |
| test_expect_success "check normal git operations: $MSG" ' |
| cd "$TRASH_DIRECTORY/$DIR" && |
| graph_git_two_modes "log --oneline $BRANCH" && |
| graph_git_two_modes "log --topo-order $BRANCH" && |
| graph_git_two_modes "log --graph $COMPARE..$BRANCH" && |
| graph_git_two_modes "branch -vv" && |
| graph_git_two_modes "merge-base -a $BRANCH $COMPARE" |
| NUM_CHUNKS=$((3 + $(echo "$2" | wc -w))) |
| if test $GENERATION_VERSION -gt 1 |
| OPTIONS=" read_generation_data" |
| header: 43475048 1 $(test_oid oid_version) $NUM_CHUNKS 0 |
| chunks: oid_fanout oid_lookup commit_metadata$OPTIONAL |
| test-tool read-graph >output && |