From: Junio C Hamano Date: Mon, 16 Mar 2026 17:48:14 +0000 (-0700) Subject: Merge branch 'fp/t3310-unhide-git-failures' X-Git-Tag: v2.54.0-rc0~71 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a11f0ad9928b54a35d660c6b38200d2212d8aeff;p=thirdparty%2Fgit.git Merge branch 'fp/t3310-unhide-git-failures' The construct 'test "$(command)" = expectation' loses the exit status from the command, which has been fixed by breaking up the statement into pieces. * fp/t3310-unhide-git-failures: t3310: avoid hiding failures from rev-parse in command substitutions --- a11f0ad9928b54a35d660c6b38200d2212d8aeff diff --cc t/t3310-notes-merge-manual-resolve.sh index f0054b0a39,8e3e71bb09..0bb366fdb8 --- a/t/t3310-notes-merge-manual-resolve.sh +++ b/t/t3310-notes-merge-manual-resolve.sh @@@ -564,18 -573,20 +573,20 @@@ EO # 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 &&