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.