git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git log and --first-parent

From
Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Date
Jul 26, 2007, 20:30 UTC
Message-ID
<200707262230.10701.robin.rosenberg.lists@dewire.com>
In-Reply-To
<200707240105.33729.robin.rosenberg.lists@dewire.com>
tisdag 24 juli 2007 skrev Robin Rosenberg:
Show 19 quoted lines
> 
> 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
Previous: Robin Rosenberg
Message 2 of 2 in “git log and --first-parent”
  1. Robin RosenbergJul 23, 2007
  2. Robin RosenbergJul 26, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.