Skip to content

Commit 110feb8

Browse files
pks-tgitster
authored andcommitted
t3310: stop checking for reference existence via test -f
One of the tests in t3310 exercises whether the special references `NOTES_MERGE_PARTIAL` and `NOTES_MERGE_REF` exist as expected when the notes subsystem runs into a merge conflict. This is done by checking on-disk data structures directly though instead of asking the reference backend. Refactor the test to use git-rev-parse(1) instead. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7e1fcb8 commit 110feb8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

t/t3310-notes-merge-manual-resolve.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,9 +561,9 @@ y and z notes on 4th commit
561561
EOF
562562
# Fail to finalize merge
563563
test_must_fail git notes merge --commit >output 2>&1 &&
564-
# .git/NOTES_MERGE_* must remain
565-
test -f .git/NOTES_MERGE_PARTIAL &&
566-
test -f .git/NOTES_MERGE_REF &&
564+
# NOTES_MERGE_* refs and .git/NOTES_MERGE_* state files must remain
565+
git rev-parse --verify NOTES_MERGE_PARTIAL &&
566+
git rev-parse --verify NOTES_MERGE_REF &&
567567
test -f .git/NOTES_MERGE_WORKTREE/$commit_sha1 &&
568568
test -f .git/NOTES_MERGE_WORKTREE/$commit_sha2 &&
569569
test -f .git/NOTES_MERGE_WORKTREE/$commit_sha3 &&

0 commit comments

Comments
 (0)