* git log and --first-parent
@ 2007-07-23 23:05 Robin Rosenberg
2007-07-26 20:30 ` Robin Rosenberg
0 siblings, 1 reply; 2+ messages in thread
From: Robin Rosenberg @ 2007-07-23 23:05 UTC (permalink / raw)
To: git
I'm puzzled over the behavior of --first-parent. The documentations seems to imply
that only the first parent is followed, but when a filter is applied it seems (just guessing)
that the "first" parent is selected *after* filtering, a behaviour that I feel does not match
the documentation.
Should the first-parent filter be applied first.
Example:
git log --first-parent --pretty=format: --name-only v1.5.2|grep ^var.c|wc -l
counts four commits where var.c was changed, while
git log --first-parent --pretty=format: --name-only v1.5.2 -- var.c |wc -l
gives me 23.
-- robin
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: git log and --first-parent
2007-07-23 23:05 git log and --first-parent Robin Rosenberg
@ 2007-07-26 20:30 ` Robin Rosenberg
0 siblings, 0 replies; 2+ messages in thread
From: Robin Rosenberg @ 2007-07-26 20:30 UTC (permalink / raw)
To: git
tisdag 24 juli 2007 skrev Robin Rosenberg:
>
> I'm puzzled over the behavior of --first-parent. The documentations seems to imply
> that only the first parent is followed, but when a filter is applied it seems (just guessing)
> that the "first" parent is selected *after* filtering, a behaviour that I feel does not match
> the documentation.
>
> Should the first-parent filter be applied first.
>
> Example:
>
> git log --first-parent --pretty=format: --name-only v1.5.2|grep ^var.c|wc -l
>
> counts four commits where var.c was changed, while
>
> git log --first-parent --pretty=format: --name-only v1.5.2 -- var.c |wc -l
>
> gives me 23.
>
> -- robin
Now, I also realize fast-forwards means --first-parent may not be as useful as I first
hoped.
-- robin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-26 20:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-23 23:05 git log and --first-parent Robin Rosenberg
2007-07-26 20:30 ` Robin Rosenberg
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).