# NOTES_MERGE_* refs and .git/NOTES_MERGE_* state files must remain
git rev-parse --verify NOTES_MERGE_PARTIAL &&
git rev-parse --verify NOTES_MERGE_REF &&
- test -f .git/NOTES_MERGE_WORKTREE/$commit_sha1 &&
- test -f .git/NOTES_MERGE_WORKTREE/$commit_sha2 &&
- test -f .git/NOTES_MERGE_WORKTREE/$commit_sha3 &&
- test -f .git/NOTES_MERGE_WORKTREE/$commit_sha4 &&
+ test_path_is_file .git/NOTES_MERGE_WORKTREE/$commit_sha1 &&
+ test_path_is_file .git/NOTES_MERGE_WORKTREE/$commit_sha2 &&
+ test_path_is_file .git/NOTES_MERGE_WORKTREE/$commit_sha3 &&
+ test_path_is_file .git/NOTES_MERGE_WORKTREE/$commit_sha4 &&
# Refs are unchanged
- test "$(git rev-parse refs/notes/m)" = "$(git rev-parse refs/notes/w)" &&
- test "$(git rev-parse refs/notes/y)" = "$(git rev-parse NOTES_MERGE_PARTIAL^1)" &&
- test "$(git rev-parse refs/notes/m)" != "$(git rev-parse NOTES_MERGE_PARTIAL^1)" &&
+ test_cmp_rev refs/notes/m refs/notes/w &&
+ test_cmp_rev refs/notes/y NOTES_MERGE_PARTIAL^1 &&
+ test_cmp_rev ! refs/notes/m NOTES_MERGE_PARTIAL^1 &&
# Mention refs/notes/m, and its current and expected value in output
test_grep -q "refs/notes/m" output &&
- test_grep -q "$(git rev-parse refs/notes/m)" output &&
- test_grep -q "$(git rev-parse NOTES_MERGE_PARTIAL^1)" output &&
+ oid=$(git rev-parse refs/notes/m) &&
+ test_grep -q "$oid" output &&
+ oid=$(git rev-parse NOTES_MERGE_PARTIAL^1) &&
+ test_grep -q "$oid" output &&
# Verify that other notes refs has not changed (w, x, y and z)
verify_notes w &&
verify_notes x &&