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

Re: [RFC] git-ghost: preserve “why” on deleted lines

From
Junio C Hamano <gitster@pobox.com>
Date
May 23, 2025, 17:24 UTC
Message-ID
<xmqqh61bxmsj.fsf@gitster.g>
In-Reply-To
<CAOc+UT0n9pRGur0d4cORU0SMQY-PNs5ekLd=LX9xc940Og+nrQ@mail.gmail.com>
Max Rhodin <max@ux.se> writes:
> Comments?
Would running "git blame" in reverse work for your use case?

Tracing deleted contents is much harder than tracing contents in the current revision, simply because you have to find where to start digging. In order to find where the contents were removed, you first need to know what exact contents you are looking for (which by definition you cannot do with the current revision), and then you need to know what revision had that code.

What I do in practice is to randomly check out an old revision to find sufficiently old one that still contains the contents ("git bisect" can help), and then go from there.

Previous: Max RhodinNext: Lucas Seiki Oshiro
Message 2 of 3 in “[RFC] git-ghost: preserve “why” on deleted lines”
  1. Max RhodinMay 23, 2025
  2. Junio C HamanoMay 23, 2025
  3. Lucas Seiki OshiroMay 23, 2025

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.