Git development
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: "D. Ben Knoble" <ben.knoble@gmail.com>
Cc: Git <git@vger.kernel.org>, Elijah Newren <newren@gmail.com>
Subject: Re: git-replay/git-history lose notes
Date: Wed, 5 Aug 2026 08:27:27 +0200	[thread overview]
Message-ID: <anLXz2vos4zbIciW@pks.im> (raw)
In-Reply-To: <CALnO6CAN1=dgRsYjABfa3CJkGnvb139EcrzS9EnX43i3szOgtQ@mail.gmail.com>

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

  reply	other threads:[~2026-08-05  6:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04 20:06 git-replay/git-history lose notes D. Ben Knoble
2026-08-05  6:27 ` Patrick Steinhardt [this message]
2026-08-05 11:39   ` D. Ben Knoble
2026-08-05 13:00     ` Phillip Wood
2026-08-05 13:05       ` D. Ben Knoble
2026-08-05 13:04   ` Junio C Hamano
2026-08-07  6:53 ` Elijah Newren
2026-08-07  9:49   ` erik88
2026-08-07 15:16     ` Elijah Newren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=anLXz2vos4zbIciW@pks.im \
    --to=ps@pks.im \
    --cc=ben.knoble@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=newren@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox