t3320: use git-symbolic-ref rather than filesystem access
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
e46775cf9e
commit
2f566d665a
@ -46,8 +46,9 @@ test_expect_success 'create some new worktrees' '
|
|||||||
test_expect_success 'merge z into y fails and sets NOTES_MERGE_REF' '
|
test_expect_success 'merge z into y fails and sets NOTES_MERGE_REF' '
|
||||||
git config core.notesRef refs/notes/y &&
|
git config core.notesRef refs/notes/y &&
|
||||||
test_must_fail git notes merge z &&
|
test_must_fail git notes merge z &&
|
||||||
echo "ref: refs/notes/y" >expect &&
|
echo "refs/notes/y" >expect &&
|
||||||
test_cmp expect .git/NOTES_MERGE_REF
|
git symbolic-ref NOTES_MERGE_REF >actual &&
|
||||||
|
test_cmp expect actual
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'merge z into y while mid-merge in another workdir fails' '
|
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' '
|
|||||||
test_must_fail git notes merge z 2>err &&
|
test_must_fail git notes merge z 2>err &&
|
||||||
test_i18ngrep "a notes merge into refs/notes/y is already in-progress at" err
|
test_i18ngrep "a notes merge into refs/notes/y is already in-progress at" err
|
||||||
) &&
|
) &&
|
||||||
test_path_is_missing .git/worktrees/worktree/NOTES_MERGE_REF
|
test_must_fail git -C worktree symbolic-ref NOTES_MERGE_REF
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'merge z into x while mid-merge on y succeeds' '
|
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' '
|
|||||||
test_i18ngrep "Automatic notes merge failed" out &&
|
test_i18ngrep "Automatic notes merge failed" out &&
|
||||||
grep -v "A notes merge into refs/notes/x is already in-progress in" out
|
grep -v "A notes merge into refs/notes/x is already in-progress in" out
|
||||||
) &&
|
) &&
|
||||||
echo "ref: refs/notes/x" >expect &&
|
echo "refs/notes/x" >expect &&
|
||||||
test_cmp expect .git/worktrees/worktree2/NOTES_MERGE_REF
|
git -C worktree2 symbolic-ref NOTES_MERGE_REF >actual &&
|
||||||
|
test_cmp expect actual
|
||||||
'
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
Reference in New Issue
Block a user