Re: [PATCH] git log [diff-tree options]...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mon, 10 Apr 2006, Junio C Hamano wrote:
> >
> > and I think we'd likely want to have some way to select the output. 
> > Probably with the path-limited diff being the default (that's what 
> > "git-whatchanged" does), but perhaps with "--full-diff" showing the whole 
> > commit diff (which is what "gitk" does).
> 
> Yes, but it turns out it is a bit tricky, given that the way
> tree-diff.c is written it pretty much assumes the same pathspec
> is used for diff operation during the lifetime of the process.

Hmm.. The hacky approach would seem to be to just call 
"diff_tree_setup_paths()" just before doing the diff (and re-set it 
afterwards). That should work, I don't think we keep any real state 
around.

> I think we should move (nr_paths, pathlens and paths) to struct
> diff_options.  Two patches to follow shortly.

That certainly seems to be the cleanest option. Not just because it should 
solve this problem, but because it's also what looks most natural anyway 
(and matches the "struct revs" approach).

		Linus
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]