From 01bfec8e52dcfa2da47b54b3c89c3181ae09b9a9 Mon Sep 17 00:00:00 2001 From: Johan Herland Date: Mon, 12 Mar 2012 15:57:12 +0100 Subject: [PATCH] t3310: illustrate failure to "notes merge --commit" inside $GIT_DIR/ The 'git notes merge' command expected to be run from the working tree of the project being annotated, and did not anticipate getting run inside $GIT_DIR/. However, because we use $GIT_DIR/NOTES_MERGE_WORKTREE as a temporary working space for the user to work on resolving conflicts, it is not unreasonable for a user to run "git notes merge --commit" there. But the command fails to do so. Found-by: David Bremner Signed-off-by: Johan Herland Signed-off-by: Junio C Hamano --- t/t3310-notes-merge-manual-resolve.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/t/t3310-notes-merge-manual-resolve.sh b/t/t3310-notes-merge-manual-resolve.sh index 436719795..0c531c379 100755 --- a/t/t3310-notes-merge-manual-resolve.sh +++ b/t/t3310-notes-merge-manual-resolve.sh @@ -553,4 +553,23 @@ test_expect_success 'resolve situation by aborting the notes merge' ' verify_notes z ' +cat >expect_notes < $(git rev-parse HEAD) && + echo "bar" >> $(git rev-parse HEAD) && + git notes merge --commit + ) && + git notes show HEAD > actual_notes && + test_cmp expect_notes actual_notes +' + test_done -- 2.30.2