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

Re: git log --follow wrongly includes delete commit

From
SGSteinar H. Gunderson <steinar+git@gunderson.no>
Date
Jan 26, 2023, 17:18 UTC
Message-ID
<20230126171830.6qb46wa2ed5h2z3b@sesse.net>
In-Reply-To
<fcc08ee2-dc58-09da-dc60-c438cfbf6602@github.com>
On Thu, Jan 26, 2023 at 11:38:42AM -0500, Derrick Stolee wrote:
> It's actually a third option: it was deleted but also renamed in an
> independent point in history, but the delete is more recent "in time"
> that it shows up first, and the merge that resolves the issue doesn't
> show up at all.

I see! So basically my parser needs to also start tracking merges, except --follow seems to be sort of odd with those as well (though I think maybe it's changed in some fairly recent git version).

> (Note: I didn't include --follow here as it filtered the --graph
> output in a strange way, including dropping the merge commitswhich was
> confusing to me.)

I think you need to give -c or --cc or something similar to see merges in --follow, but the man pages are not entirely clear to me.

/* Steinar */
-- 
Homepage: https://www.sesse.net/
Previous: Derrick Stolee
Message 3 of 3 in “git log --follow wrongly includes delete commit”
  1. Steinar H. GundersonJan 26, 2023
  2. Derrick StoleeJan 26, 2023
  3. Steinar H. GundersonJan 26, 2023

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.