Re: [PATCH] Make git-diff-tree indicate when it flushes

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Make git-diff-tree indicate when it flushes

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:27

Paul Mackerras [off-list ref] writes:
quoted
Wouldn't this help?

	$ git-diff-tree --stdin --always
On the git.git tree:

$ cat revs
65aadb92a1ce9605fa2f412b51de91781a3ef3d6
cc189c2ca2c725c430f100f61e7c4a6849f93163
$ git diff-tree -r -s --stdin -- apply.c <revs
65aadb92a1ce9605fa2f412b51de91781a3ef3d6
$ git diff-tree -r -s --stdin --always -- apply.c <revs
65aadb92a1ce9605fa2f412b51de91781a3ef3d6
cc189c2ca2c725c430f100f61e7c4a6849f93163
$

With --always, how do I tell that 65aadb affects apply.c and cc189c
doesn't?
I am not quite sure exactly what you are trying to achieve, but
one trivial way is not giving -s perhaps?

Re: [PATCH] Make git-diff-tree indicate when it flushes

From: Paul Mackerras <hidden>
Date: 2016-06-15 22:42:27

Junio C Hamano writes:
I am not quite sure exactly what you are trying to achieve, but
one trivial way is not giving -s perhaps?
I'm asking git-diff-tree which of a given set of commits affect any of
a set of paths, so that gitk can highlight the ones that do.
Furthermore I want to be able to use the git-diff-tree process for
multiple sets of commit IDs.

If I don't use -s, then I will get lines starting with a ":" after the
commit IDs of the commits that do affect the set of paths I specified.
That means I get a definite indication for all except the last commit
I send.  For the last commit I still don't know whether the absence of
any ":" lines means that the commit doesn't affect the set of paths,
or that git-diff-tree is being slow.  So I still need something like
the patch I sent.

I could get the indication I want (with or without -s) if I close the
pipe going to the git-diff-tree process.  But then the process will
exit, and I want it to stay around so that I don't have to pay the
fork/exec and startup time of git-diff-tree next time (which will be
when the user scrolls the commit list window or asks to move to the
next highlighted commit).

Thus, --always (with or without -s) doesn't quite do what I need.

Paul.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help