Git development
 help / color / mirror / Atom feed
* BUG? git rebase -x "git commit --amend …" loses notes
@ 2026-08-05 13:13 D. Ben Knoble
  2026-08-05 13:42 ` Phillip Wood
  0 siblings, 1 reply; 4+ messages in thread
From: D. Ben Knoble @ 2026-08-05 13:13 UTC (permalink / raw)
  To: Git

Sigh… I haven't minimized a reproduction case here yet, but maybe
someone can tell me how I'm holding it wrong.

I have a local branch with notes in refs/notes/benknoble/commits (in
particular, the tip commit has a note). I forgot to adjust my author
email before creating some of these commits, and I wanted to adjust it
to match the mailmap patch I just sent out, so I ran

    git rebase -x "git commit --no-verify --no-edit --amend
--author='$(git config get user.name) <$(git config get user.email)>'"

Upon checking (much) later, I discovered the note was missing! It had
not been rewritten. And yet:

    git config get --all --regexp --show-names --show-scope notes | column -t
    global  format.notes      true
    global  notes.rewriteref  refs/notes/commits
    local   core.notesref     refs/notes/benknoble/commits
    local   notes.rewriteref  refs/notes/benknoble/commits
    local   notes.displayref  refs/notes/origin/amlog

So I would have expected the notes to get rewritten?

- Running "git commit … --amend …" (author change and all) rewrites the notes
- Running "git rebase -x echo" rewrites the notes (well, it has
nothing to do right now, so it doesn't modify anything; however, I'm
99.9% convinced that when I did a plain rebase earlier today the notes
were preserved, just like they are all the time)

It's just the combination that loses them :/

-- 
D. Ben Knoble

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

end of thread, other threads:[~2026-08-06 12:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-05 13:13 BUG? git rebase -x "git commit --amend …" loses notes D. Ben Knoble
2026-08-05 13:42 ` Phillip Wood
2026-08-05 16:31   ` Phillip Wood
2026-08-06 12:01     ` D. Ben Knoble

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox