From: Linus Torvalds <torvalds@linux-foundation.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
James Morris <jmorris@namei.org>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
git@vger.kernel.org
Subject: Re: linux-next: manual merge of the security-testing tree with the tree
Date: Thu, 30 Jun 2011 09:20:35 -0700 [thread overview]
Message-ID: <BANLkTi=usrsF60Popfu55v3_dXe7Yo0GrA@mail.gmail.com> (raw)
In-Reply-To: <20110630121710.GJ11559@pengutronix.de>
2011/6/30 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
>
> A flag would be nice that does what I did: redo the merge and compare
> bcd05ca10420^{tree} with the result?
The problem with that is that it's *way* too expensive an operation to
do for the normal "git log" kind of operations.
Also, truly re-doing the merge actually requires workspace access
and/or require new objects to be created, so it would be inappropriate
anyway: git log/show absolutely has to be a read-only operation,
anything else would be totally insane.
So there's no way - both for performance and 'fundamental' reasons -
to make the normal logging code truly re-do the merge and then compare
the end result of the merge with the end result that is in the tree.
That said, what the current "git show/log" does is to just compare the
end points with the merge result, which means that if the end result
matches either of the end-points, nothing will be shown. That works
for the common cases, but it absolutely doesn't work if somebody does
something crazy, and just picks one end-point over another without
doing a proper merge (ie "-s ours" or just a mis-merge). But the
reason it's done that way is that it's possible to do without re-doing
the merge.
It would be lovely if "git show" (and log operations) had some option
to do a "expensive merge check" and did actually figure out the common
ancestor and at least took that into account.
It would be doable to do it at least better than we do now - the
common ancestor is not cheap to compute, but it's much cheaper than a
full merge, and would at least allow us to flag dangerous merges. Of
course, it gets fun when there are multiple common ancestors and
renames. It's entirely possible that it's never going to be practical
to do anything but "re-do the merge and compare result".
Linus
next prev parent reply other threads:[~2011-06-30 16:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-30 4:29 linux-next: manual merge of the security-testing tree with the tree Stephen Rothwell
2011-06-30 4:33 ` Stephen Rothwell
2011-06-30 4:39 ` Stephen Rothwell
2011-06-30 5:22 ` James Morris
2011-06-30 5:53 ` Stephen Rothwell
2011-06-30 7:25 ` Uwe Kleine-König
2011-06-30 9:30 ` Stephen Rothwell
2011-06-30 12:17 ` Uwe Kleine-König
2011-06-30 16:20 ` Linus Torvalds [this message]
2011-06-30 18:52 ` Junio C Hamano
2011-06-30 19:13 ` Jeff King
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='BANLkTi=usrsF60Popfu55v3_dXe7Yo0GrA@mail.gmail.com' \
--to=torvalds@linux-foundation.org \
--cc=git@vger.kernel.org \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=u.kleine-koenig@pengutronix.de \
/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).