From: Linus Torvalds <torvalds@linux-foundation.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Strange merge failure (would be overwritten by merge / cannot merge)
Date: Sun, 6 Sep 2009 13:42:24 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.2.01.0909061338350.8946@localhost.localdomain> (raw)
In-Reply-To: <7vws4bzu7w.fsf@alter.siamese.dyndns.org>
On Sun, 6 Sep 2009, Junio C Hamano wrote:
>
> The reason I brought up adding the "candidate for the earliest name"
> interface to the function was to avoid a case where the index has
>
> blob "t"
> blob "t-f"
>
> and all the trees being merged have
>
> blob "t-f"
> tree "t"
>
> in which case the "Are we supposed to look at the index too?" logic in
> unpack_callback() may not catch the "t-f" entry from the index when the
> first callback from traverse_trees() feeds it "t-f".
I agree. It's why I initially wanted to do it _all_ in the
unpack_callback() thing, but the more I tried, the more complex it got.
So now my plan is to do the conflict handling at a tree level in
traverse_trees(), and get rid of the use of 'df_name_compare()' just there
first.
The index case is slightly easier, as we can go back-and-forth in the
source index (we do try to avoid it right now, but that's a small
optimization rather than anything fundamental), so the index we can
traverse in a more flexible manner, and find the 't' conflict that way.
Linus
next prev parent reply other threads:[~2009-09-06 20:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-04 20:28 Strange merge failure (would be overwritten by merge / cannot merge) Christoph Haas
2009-09-04 23:45 ` David Aguilar
2009-09-05 13:07 ` Christoph Haas
2009-09-05 17:46 ` Junio C Hamano
2009-09-06 0:33 ` Junio C Hamano
2009-09-06 8:21 ` Junio C Hamano
2009-09-06 18:18 ` Linus Torvalds
2009-09-06 19:39 ` Junio C Hamano
2009-09-06 19:54 ` Linus Torvalds
2009-09-06 20:36 ` Junio C Hamano
2009-09-06 20:42 ` Linus Torvalds [this message]
2009-09-06 20:58 ` Linus Torvalds
2009-09-06 21:17 ` Junio C Hamano
2009-09-06 21:37 ` Linus Torvalds
2009-09-06 22:49 ` Linus Torvalds
2009-09-06 21:11 ` Junio C Hamano
2009-09-05 6:40 ` unpack-trees traversing with index quite broken 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=alpine.LFD.2.01.0909061338350.8946@localhost.localdomain \
--to=torvalds@linux-foundation.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).