git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] git-ghost: preserve “why” on deleted lines
@ 2025-05-23 12:32 Max Rhodin
  2025-05-23 17:24 ` Junio C Hamano
  2025-05-23 19:45 ` Lucas Seiki Oshiro
  0 siblings, 2 replies; 3+ messages in thread
From: Max Rhodin @ 2025-05-23 12:32 UTC (permalink / raw)
  To: git

Hi,

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.

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.

No core changes—pure userland. Repos can opt in or out. Also helps AI
agents make sense of code history.

Could be made in thousands of ways, but unless the deleted rows are saved
as actual file-bound information, understanding it later and building tools
for it is much harder. `git note` could be used, but doesn't really solve
the issue.

Comments?

Max Rhodin
max@ux.se

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-23 19:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-23 12:32 [RFC] git-ghost: preserve “why” on deleted lines Max Rhodin
2025-05-23 17:24 ` Junio C Hamano
2025-05-23 19:45 ` Lucas Seiki Oshiro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).