Re: git-replay/git-history lose notes

Patrick Steinhardt <[email protected]> Wed, 5 Aug 2026 08:27:27 +0200
Newsgroups org.kernel.vger.git
Message-ID <[email protected]>
Hi,

On Tue, Aug 04, 2026 at 04:06:38PM -0400, D. Ben Knoble wrote:
> Hi all,
> 
> I don't think this has been reported or discussed yet, though my
> apologies if my search skills just didn't find it.
> 
> It looks like git-replay and git-history will drop notes (or rather,
> not carry them over) when rewriting history. I've seen this both with
> "git replay --onto=… …" and "git history fixup" recently, though I
> suspect it affects all the modes.
> 
> Fortunately when I check range-diffs before pushing out new versions,
> I notice notes have disappeared and can "git notes copy @{1}" or
> similar for a note at the tip. Recovery for the intermediate commits
> is a little more… involved… as I'm sure you can imagine.

This somehow rings a bell -- wasn't there a recent discussion about this
on the mailing list somewhere? I might be confusing it with a different
command though that's loosing notes.

> Are notes out of scope for replay and history, or is this just a
> "nobody's gotten around to it yet"?

For git-replay(1) I'm not too sure, as I consider that command to be
part of plumbing. But git-history(1) is a user-facing command, and
because of that I think it should handle notes automatically for the
user.

So for me at least it's more of a "nobody's gotten around to it yet"
scenario. I've created an issue in our GitLab issue tracker so that we
can maybe pick this up in the next release cycle. But I won't complain
if anybody beats us to it :)

Thanks!

Patrick