1 # Compare a file containing rev-list bitmap traversal output to its non-bitmap
2 # counterpart. You can't just use test_cmp for this, because the two produce
3 # subtly different output:
5 # - regular output is in traversal order, whereas bitmap is split by type,
6 # with non-packed objects at the end
8 # - regular output has a space and the pathname appended to non-commit
9 # objects; bitmap output omits this
11 # This function normalizes and compares the two. The second file should
12 # always be the bitmap output.
13 test_bitmap_traversal
() {
14 if test "$1" = "--no-confirm-bitmaps"
19 echo >&2 "identical raw outputs; are you sure bitmaps were used?"
22 cut
-d' ' -f1 "$1" |
sort >"$1.normalized" &&
23 sort "$2" >"$2.normalized" &&
24 test_cmp
"$1.normalized" "$2.normalized" &&
25 rm -f "$1.normalized" "$2.normalized"