From: Jonathan Nieder <jrnieder@gmail.com>
To: Will Palmer <wmpalmer@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [BUG/TEST] show breakage of status for copy+conflict
Date: Thu, 5 Aug 2010 07:55:13 -0500 [thread overview]
Message-ID: <20100805125513.GB23334@burratino> (raw)
In-Reply-To: <1280960393-17256-1-git-send-email-wmpalmer@gmail.com>
Will Palmer wrote:
> I noticed during a rebase that a conflicted file was not showing up
> under the "both changed:" line, and was instead showing up as the
> original name of a rename.
> This was because the file had conflicts, and so was not in the index
> (or at least, not in stage 0, if I have my terminology correct), while
> another, very similar (both based on the same template) file had been
> added as part of the same change on my side.
Hmm, so:
3
/
1 --- 2
1: file A with content A
2: file A with content A',
B with content A
3: file A with content A''
where the changes A->A' and A->A'' conflict.
And behind the scenes:
There is only one merge-base, so merge_recursive has nothing to
contribute. It’s all merge_trees()’s bag;
merge_trees() does unpack_trees() before anything else, which could
care less about rename detection;
Then it tries get_renames(), which figures out what happened;
Then process_renames(), which realizes there is nothing to do to fix
this up and reports CONFLICT (content);
And "Automatic merge failed", without any more advice to describe what
happened.
Caller tries "git status".
$ git ls-files --stage --abbrev
100644 aed72d7 1 A
100644 0abac9e 2 A
100644 a5f0d50 3 A
100644 aed72d7 0 B
$ git diff-index --cached HEAD --abbrev
:100644 000000 aed72d7... 0000000... U A
:000000 100644 0000000... aed72d7... A B
$ git diff-index -M --cached HEAD --abbrev
:100644 100644 aed72d7... aed72d7... R100 A B
"git status -s" prints the right output. So wt_status_collect() seems
to have collected the right information somehow.
> I don't really have the time right now to look for exactly what causes
> this bug, so I'm hoping that posting a demonstration of it will get
> someone else to fix it for me.
No ideas at the moment; sorry.
Jonathan
prev parent reply other threads:[~2010-08-05 12:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-04 22:19 [BUG/TEST] show breakage of status for copy+conflict Will Palmer
2010-08-05 12:55 ` Jonathan Nieder [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=20100805125513.GB23334@burratino \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=wmpalmer@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).