From: Clemens Buchacher <drizzd@aon.at>
To: Jeff King <peff@peff.net>
Cc: Joe Angell <joe.d.angell@gmail.com>,
Elijah Newren <newren@gmail.com>,
git@vger.kernel.org
Subject: Re: git bug: moved file with local unstaged changes are lost during merge
Date: Sun, 15 Apr 2012 01:15:17 +0200 [thread overview]
Message-ID: <20120414231515.GB18137@ecki> (raw)
In-Reply-To: <20120413064941.GC27214@sigill.intra.peff.net>
On Fri, Apr 13, 2012 at 02:49:41AM -0400, Jeff King wrote:
>
> t6042 and t6036 detect some of them. But I thought we managed to clean
> up all of the overwriting bugs.
I could not find an existing test for this.
-->o--
Subject: [PATCH] merge overwrites unstaged changes in renamed file
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
---
t/t7607-merge-overwrite.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/t/t7607-merge-overwrite.sh b/t/t7607-merge-overwrite.sh
index aa74184..6547eb8 100755
--- a/t/t7607-merge-overwrite.sh
+++ b/t/t7607-merge-overwrite.sh
@@ -92,6 +92,15 @@ test_expect_success 'will not overwrite removed file with staged changes' '
test_cmp important c1.c
'
+test_expect_failure 'will not overwrite unstaged changes in renamed file' '
+ git reset --hard c1 &&
+ git mv c1.c other.c &&
+ git commit -m rename &&
+ cp important other.c &&
+ git merge c1a &&
+ test_cmp important other.c
+'
+
test_expect_success 'will not overwrite untracked subtree' '
git reset --hard c0 &&
rm -rf sub &&
--
1.7.9.6
next prev parent reply other threads:[~2012-04-14 23:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-11 18:20 git bug: moved file with local unstaged changes are lost during merge Joe Angell
2012-04-12 16:13 ` Joe Angell
2012-04-13 6:49 ` Jeff King
2012-04-14 23:15 ` Clemens Buchacher [this message]
2012-04-29 14:17 ` Clemens Buchacher
2012-04-30 0:16 ` Junio C Hamano
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=20120414231515.GB18137@ecki \
--to=drizzd@aon.at \
--cc=git@vger.kernel.org \
--cc=joe.d.angell@gmail.com \
--cc=newren@gmail.com \
--cc=peff@peff.net \
/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).