* git log: why are --full-diff and --pickaxe-all separate options?
@ 2010-03-24 15:52 Jay Soffian
2010-03-24 16:20 ` Jeff King
2010-03-24 17:19 ` Junio C Hamano
0 siblings, 2 replies; 3+ messages in thread
From: Jay Soffian @ 2010-03-24 15:52 UTC (permalink / raw)
To: git
I just did this:
$ git log -p -- /some/path
And didn't get the full commit. I know about the --pickaxe-all option,
so I optimistically tried:
$ git log -p --pickaxe-all -- /some/path
Which of course, does not do what I want. Eventually I found in the
man page that I can do this:
$ git log -p --full-diff -- /some/path
But now I wonder why these are separate options. Is there any reason
they shouldn't be unified?
Regardless, perhaps --pickaxe-all without -S and --full-diff without
-p should be errors?
j.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git log: why are --full-diff and --pickaxe-all separate options?
2010-03-24 15:52 git log: why are --full-diff and --pickaxe-all separate options? Jay Soffian
@ 2010-03-24 16:20 ` Jeff King
2010-03-24 17:19 ` Junio C Hamano
1 sibling, 0 replies; 3+ messages in thread
From: Jeff King @ 2010-03-24 16:20 UTC (permalink / raw)
To: Jay Soffian; +Cc: git
On Wed, Mar 24, 2010 at 11:52:13AM -0400, Jay Soffian wrote:
> But now I wonder why these are separate options. Is there any reason
> they shouldn't be unified?
I agree it is confusing, and the answer is "maybe". A long and gory
explanation can be found here:
http://article.gmane.org/gmane.comp.version-control.git/34909
Read the later messages in the thread from Junio, too, as he goes back
and forth a bit. I don't remember if anything happened after that, or
why not.
-Peff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git log: why are --full-diff and --pickaxe-all separate options?
2010-03-24 15:52 git log: why are --full-diff and --pickaxe-all separate options? Jay Soffian
2010-03-24 16:20 ` Jeff King
@ 2010-03-24 17:19 ` Junio C Hamano
1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2010-03-24 17:19 UTC (permalink / raw)
To: Jay Soffian; +Cc: git
Jay Soffian <jaysoffian@gmail.com> writes:
> But now I wonder why these are separate options. Is there any reason
> they shouldn't be unified?
They do entirely different things, and It does not make any sense to
"unify" them.
But it would be an improvement to make them work better together.
- Erroring out when --pickaxe-all is given without -S would make sense;
- Making --full-diff to imply --pickaxe-all when -S is used would also
make sense.
[Footnote]
*1* I wrote the following before reading Jeff's response where I explained
it already; it should say the same thing so if you read the message Jeff
pointed at, you don't have to read this, but I didn't want to waste my
typing, so ...
The log dataflow is:
- revision walker finds commits one-by-one, but limiting the commits
to the ones that touch the paths in the pathspec.
- each found commit and its ancestor(s) are given to the diff
machinery, in order to skip the commit if there is no difference,
and also as a side effect to show the diff.
- diff front-end collects paths in the commit pair, limited by the
pathspec given. however, this can be countermanded with full-diff.
- diffcore does its thing---compares the collected paths, ignoring
changes between pairs that do not satisfy pickaxe filter (if given).
- when pickaxe is in effect, usually paths that do not satisfy the
pickaxe filter is _discarded_ even if they are different between
the parent and the child.
- pickaxe-all however prevents the above. If even one path
satisifies the pickaxe filter, all paths survive.
- if there are still changes after the above computation, the change
is shown in diff form (when -p is given).
For example, "log -Shello -- world/" would:
a) limit to commits that touch something in world/ directory;
b) compare commit and its parents but limit this comparison in world/
directory.
c) if some compared file have different number of "hello" in parent and
child, diff for only those files is shown.
Giving --full-diff affects step b. files outside world/ will also be
inspected in step c and the ones that changes the number of "hello"
are shown even if outside world/
Giving --pickaxe affects step c.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-03-24 17:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-24 15:52 git log: why are --full-diff and --pickaxe-all separate options? Jay Soffian
2010-03-24 16:20 ` Jeff King
2010-03-24 17:19 ` Junio C Hamano
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).