From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Daniel Barkalow <barkalow@iabervon.org>,
git@vger.kernel.org, Jiri Olsa <olsajiri@gmail.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] read-tree A B C: do not create a bogus index and do not segfault
Date: Fri, 13 Mar 2009 23:41:56 -0700 [thread overview]
Message-ID: <7v7i2sehcb.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LFD.2.00.0903120929250.32478@localhost.localdomain> (Linus Torvalds's message of "Thu, 12 Mar 2009 09:34:49 -0700 (PDT)")
Linus Torvalds <torvalds@linux-foundation.org> writes:
> On Thu, 12 Mar 2009, Daniel Barkalow wrote:
>
>> I think it might be a good idea to take this as evidence that nobody is
>> using read-tree with multiple trees without merge, and just disallow it.
>
> Hmm. It _has_ been used. It's been useful for really odd things
> historically, namely trying to merge different trees by hand. So while I
> agree that we could probably remove it, it _is_ a very interesting
> feature in theory, and since we have the code..
>
> So I'd say "add a few tests for the known horrible cases" should be the
> first approach. If it ever actually breaks again and becomes a big
> maintenance headache, maybe _then_ remove the feature as not being worth
> the pain?
I've added trivial tests and will start cooking it by letting it go
through the usual pu/next/master/maint cycle.
I think you are thinking about something like the "gitk" merge (aka "The
coolest merge EVER!" [*1*]), but you can do the same thing more safely
with -m option, giving an empty tree as the common ancestor. Especially
if you run it in the aggressive mode, "addition" from our tree and their
tree, when it is an overlay, will not overlap, and will all cleanly
resolve to stage #0.
I suspect you can also use a single tree "read-tree", immediately followed
by another "read-tree --prefix=''" to read in two trees into the index and
write the results out.
[Footnote]
*1* http://article.gmane.org/gmane.comp.version-control.git/5126
prev parent reply other threads:[~2009-03-14 6:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-10 19:34 [BUG] - git-read-tree segfaults Jiri Olsa
2009-03-10 19:50 ` Johannes Schindelin
2009-03-10 20:21 ` Johannes Schindelin
2009-03-11 7:59 ` Jiri Olsa
2009-03-11 12:04 ` Johannes Schindelin
2009-03-12 5:57 ` Junio C Hamano
2009-03-12 7:01 ` Junio C Hamano
2009-03-12 7:29 ` [PATCH] read-tree A B C: do not create a bogus index and do not segfault Junio C Hamano
2009-03-12 14:46 ` Daniel Barkalow
2009-03-12 16:34 ` Linus Torvalds
2009-03-14 6:41 ` Junio C Hamano [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=7v7i2sehcb.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
--cc=olsajiri@gmail.com \
--cc=torvalds@linux-foundation.org \
/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).