@@ -46,8 +46,9 @@ test_expect_success 'create some new worktrees' '
46
46
test_expect_success ' merge z into y fails and sets NOTES_MERGE_REF' '
47
47
git config core.notesRef refs/notes/y &&
48
48
test_must_fail git notes merge z &&
49
- echo "ref: refs/notes/y" >expect &&
50
- test_cmp expect .git/NOTES_MERGE_REF
49
+ echo "refs/notes/y" >expect &&
50
+ git symbolic-ref NOTES_MERGE_REF >actual &&
51
+ test_cmp expect actual
51
52
'
52
53
53
54
test_expect_success ' merge z into y while mid-merge in another workdir fails' '
@@ -57,7 +58,7 @@ test_expect_success 'merge z into y while mid-merge in another workdir fails' '
57
58
test_must_fail git notes merge z 2>err &&
58
59
test_i18ngrep "a notes merge into refs/notes/y is already in-progress at" err
59
60
) &&
60
- test_path_is_missing . git/worktrees/ worktree/ NOTES_MERGE_REF
61
+ test_must_fail git -C worktree symbolic-ref NOTES_MERGE_REF
61
62
'
62
63
63
64
test_expect_success ' merge z into x while mid-merge on y succeeds' '
@@ -68,8 +69,9 @@ test_expect_success 'merge z into x while mid-merge on y succeeds' '
68
69
test_i18ngrep "Automatic notes merge failed" out &&
69
70
grep -v "A notes merge into refs/notes/x is already in-progress in" out
70
71
) &&
71
- echo "ref: refs/notes/x" >expect &&
72
- test_cmp expect .git/worktrees/worktree2/NOTES_MERGE_REF
72
+ echo "refs/notes/x" >expect &&
73
+ git -C worktree2 symbolic-ref NOTES_MERGE_REF >actual &&
74
+ test_cmp expect actual
73
75
'
74
76
75
77
test_done
0 commit comments