git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [Announce] gitview-0.1

From
Linus Torvalds <torvalds@osdl.org>
Date
Feb 1, 2006, 20:17 UTC
Message-ID
<Pine.LNX.4.64.0602011206040.21884@g5.osdl.org>
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
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 9 in “[Announce] gitview-0.1”
  1. Aneesh KumarFeb 1, 2006
  2. Dave JonesFeb 1, 2006
  3. Aneesh KumarFeb 1, 2006
  4. Aneesh KumarFeb 1, 2006
  5. Junio C HamanoFeb 1, 2006
  6. Linus TorvaldsFeb 1, 2006
  7. Junio C HamanoFeb 1, 2006
  8. Alex RiesenFeb 1, 2006
  9. Fernando J. PeredaFeb 1, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.