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 - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.htmlReceived on Thu Feb 02 07:18:13 2006
This archive was generated by hypermail 2.1.8 : 2006-02-02 07:18:22 EST