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

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

From
Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Date
May 23, 2025, 19:45 UTC
Message-ID
<9F0F0FF5-85D8-48E8-B056-F71F56AEB915@gmail.com>
In-Reply-To
<CAOc+UT0n9pRGur0d4cORU0SMQY-PNs5ekLd=LX9xc940Og+nrQ@mail.gmail.com>
> Hi,
Hi, Max!
> I hate losing the why behind a deleted line.
> 
> When you drop code in a review, being able to attach a brief comment
> to that line would save a lot of head-scratching.

Sorry if I misunderstood you, but I can't see the difference of that to committing empty lines + giving a meaningful commit message.

Show 8 quoted lines
> Git-ghost – see the remnants of days past in a file.
> 
> git-ghost hooks into commit to stash deleted lines in a `.ghost` file
> and enables maintainers to prompt for a short reason. Later you can run:
> 
>    git ghost view <file>
> 
> to see what vanished and why. Blame also becomes easier.

I still don't see the difference of that to git log -- <file>. I understand that git blame doesn't show what has been deleted, only what is new and what has changed. But ok, git blame has it's limitations of being a quick line-wise inspection tool, while more deeper analysis would require more powerful tools. It looks to me that git log with some flags would do what you need.

Previous: Junio C Hamano
Message 3 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.