From: Linus Torvalds <torvalds@osdl.org>
To: Junio C Hamano <junkio@cox.net>
Cc: Aneesh Kumar <aneesh.kumar@gmail.com>,
Dave Jones <davej@redhat.com>,
git@vger.kernel.org
Subject: Re: [Announce] gitview-0.1
Date: Wed, 1 Feb 2006 12:17:02 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0602011206040.21884@g5.osdl.org> (raw)
In-Reply-To: <7v3bj2df1b.fsf@assigned-by-dhcp.cox.net>
On Wed, 1 Feb 2006, Junio C Hamano wrote:
>
> Are parent_sha$N true parents of commit_sha1? If you want to
> get three independent diffs, "git diff-tree -m -p $commit_sha1"
> would give that to you in one go.
Btw, I think we should change
git-diff-tree --stdin
to look at the rest of the line.
Right now it _only_ takes the commit from that line, along with possibly
the first parent if one exists (if one is not listed, the list of parents
will be correctly taken from the commit).
Which makes it mostly useless for merges with a dense history.
Especially with the new "-cc" flag, using it for merges really does make
a lot of sense, but it's not workable.
So right now, git-whatchanged does
git-rev-list | git-diff-tree --stdin <filelist>
which means that it handles merges in a pruned-down history wrong. Now,
that's ok, because it currently never prunes the history of git-rev-list
(it instead prunes purely in git-diff-tree). So it works right, and can
take the -cc flag because it always gets the parent information from the
commit.
HOWEVER, currently doing the pruning the other way around, ie
git-rev-list --parents <filelist> | git-diff-tree --stdin
does _not_ work right. It ignores anything but the first parent, because
"git-diff-tree --stdin" doesn't understand merges.
And doing the pruning the other way around would actually make sense
sometimes. Not for git-whatchanged (where doing the pruning in
git-diff-tree means that we don't have to parse the history ahead of time,
so we get immediate feedback), but in a git-annotate context you want to
do the pruning ahead-of-time. So git-diff-tree not supporting it is sad ;(
Linus
next prev parent reply other threads:[~2006-02-01 20:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-01 4:16 [Announce] gitview-0.1 Aneesh Kumar
2006-02-01 4:29 ` Dave Jones
2006-02-01 4:41 ` Aneesh Kumar
2006-02-01 11:28 ` Aneesh Kumar
2006-02-01 20:01 ` Junio C Hamano
2006-02-01 20:17 ` Linus Torvalds [this message]
2006-02-01 20:34 ` Junio C Hamano
2006-02-01 20:58 ` Alex Riesen
2006-02-01 21:02 ` Fernando J. Pereda
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=Pine.LNX.4.64.0602011206040.21884@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=aneesh.kumar@gmail.com \
--cc=davej@redhat.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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).