From: Johan Herland <johan@herland.net>
To: git@vger.kernel.org
Cc: Johan Herland <johan@herland.net>,
gitster@pobox.com, david@tethera.net, pclouds@gmail.com
Subject: [PATCH 1/2] t3310: Add testcase demonstrating failure to --commit from within another dir
Date: Mon, 12 Mar 2012 15:57:12 +0100 [thread overview]
Message-ID: <1331564233-1969-1-git-send-email-johan@herland.net> (raw)
In-Reply-To: <87boo3m50x.fsf@zancas.localnet>
Found-by: David Bremner <david@tethera.net>
Signed-off-by: Johan Herland <johan@herland.net>
---
(sending again in the correct thread. Sorry for the screwup.)
This is a transcription of David's test script into a git test case.
Thanks to David for finding this issue.
Have fun! :)
...Johan
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 4367197..0c531c3 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 <<EOF
+foo
+bar
+EOF
+
+test_expect_failure 'switch cwd before committing notes merge' '
+ git notes add -m foo HEAD &&
+ git notes --ref=other add -m bar HEAD &&
+ test_must_fail git notes merge refs/notes/other &&
+ (
+ cd .git/NOTES_MERGE_WORKTREE &&
+ echo "foo" > $(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
--
1.7.9.2
next prev parent reply other threads:[~2012-03-12 14:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-11 17:17 problem with merging notes David Bremner
2012-03-11 18:37 ` Michael Schubert
2012-03-12 14:57 ` Johan Herland [this message]
2012-03-12 14:57 ` [PATCH 2/2] notes-merge: use opendir/readdir instead of using read_directory() Johan Herland
2012-03-12 18:21 ` [PATCH 1/2] t3310: Add testcase demonstrating failure to --commit from within another dir Junio C Hamano
2012-03-12 18:54 ` Johan Herland
-- strict thread matches above, loose matches on Subject: below --
2011-10-24 6:36 [PATCH/WIP 02/11] notes-merge: use opendir/readdir instead of using read_directory() Nguyễn Thái Ngọc Duy
2012-03-12 14:47 ` [PATCH 1/2] t3310: Add testcase demonstrating failure to --commit from within another dir Johan Herland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1331564233-1969-1-git-send-email-johan@herland.net \
--to=johan@herland.net \
--cc=david@tethera.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).