Re: git-replay/git-history lose notes

Elijah Newren <[email protected]>
Newsgroups org.kernel.vger.git
Message-ID <CABPp-BHbWKr5tv9ApH8ZagJkY39XZgQbLoFrmQJfU71z1y6_xw@mail.gmail.com>
On Tue, Aug 4, 2026 at 1:06 PM D. Ben Knoble <[email protected]> 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.
>
> Are notes out of scope for replay and history, or is this just a
> "nobody's gotten around to it yet"?

git filter-repo (and implicitly fast-export/fast-import) too, though
that one's a slightly bigger can of worms.  (Trying to treat notes as
the underlying commits they are represented as is a really poor way to
export and import them; any filtering on the underlying commits will
cause the notes that attach to them to just be lost since they will
instead attach to the original commit.)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.