From: Michael J Gruber <git@drmicha.warpmail.net>
To: Tim Mazid <timmazid@hotmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [BUG?] git stash pop results in conflict
Date: Wed, 24 Mar 2010 11:34:42 +0100 [thread overview]
Message-ID: <4BA9EAC2.4020707@drmicha.warpmail.net> (raw)
In-Reply-To: <SNT124-W41E7349234C70B82E8D6BFC4250@phx.gbl>
Tim Mazid venit, vidit, dixit 24.03.2010 03:01:
>
> Hi,
>
> I'm not sure if this is a bug or if it should be thus.
>
> Basically, a 'git stash --keep-index' followed immediately by a 'git stash pop' (no changes made) will result in a conflict.
>
> Steps to reproduce:
>
>
> Put
>
> "AAA
> BBB
> CCC"
>
> into file 'test'
>
> $ git add test
> $ git commit -m "A"
>
> Append lines
>
> "DDD
> EEE
> FFF
> GGG"
>
> into file 'test'
>
> $ git add -p
>
> Press 'e' and remove the "FFF" and "GGG" files from the patch, to stage only the "DDD" and "EEE" files.
>
> $ git stash --keep-index
Right here, git stash show -p shows that the recorded stash is a merge diff:
diff --cc test
index 7b0e998,988cecb..83b9202
--- a/test
+++ b/test
@@@ -1,3 -1,5 +1,7 @@@
AAA
BBB
CCC
+ DDD
+ EEE
++FFF
++GGG
The index still has the following (git diff --staged):
diff --git c/test i/test
index 7b0e998..988cecb 100644
--- c/test
+++ i/test
@@ -1,3 +1,5 @@
AAA
BBB
CCC
+DDD
+EEE
> $ git stash pop
>
> CONFLICT
>
>
> I hope that's clear enough.
git diff shows the conflict:
diff --cc test
index 988cecb,83b9202..0000000
--- i/test
+++ w/test
@@@ -3,3 -3,5 +3,8 @@@ BB
CCC
DDD
EEE
++<<<<<<< Updated upstream
++=======
+ FFF
+ GGG
++>>>>>>> Stashed changes
According to the example in the man page, I would have thought that
committing between save and pop would help, but it produces the same
problem. pop --index doesn't help either. Do you happen to know whether
this used to work?
Michael
prev parent reply other threads:[~2010-03-24 10:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-24 2:01 [BUG?] git stash pop results in conflict Tim Mazid
2010-03-24 10:34 ` Michael J Gruber [this message]
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=4BA9EAC2.4020707@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=timmazid@hotmail.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).