git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* notes.rewriteRef doesn't apply to rebases that skip the commit
@ 2014-04-07 20:26 Kevin Ballard
  2014-04-07 21:33 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Ballard @ 2014-04-07 20:26 UTC (permalink / raw)
  To: gitList list


I’ve started using notes recently, and I have notes.rewriteRef set so that
when I rebase, my notes will be kept. Unfortunately, it turns out that if a
rebase deletes my local commit because it already exists in upstream, it
doesn’t copy the note to the upstream commit. It seems perfectly reasonable to
me to expect the note to be copied to the upstream commit, as it represents
the same change.

One complication I can see is when my local commit is deleted not because it
exists upstream, but because it ends up being an empty commit due to the
changes existing across multiple upstream commits. In this case I see no
alternative but to have the note disappear. But I think that's acceptable.

Another potential issues is if the commit exists upstream, but the surrounding
context has changed enough that it contains a different patch-id. In this
case, I would want Git to take the extra effort to correlate the upstream
commit with my local one (it has the same message, modulo any Signed-Off-By
lines, the same authorship info, and all the - and + lines in the diff are
identical). That said, I'd still understand if it didn't do that and lost my
note. It would be unfortunate, but it would match today's behavior. I'm ok
with copying over my notes when necessary, I just want Git to handle it when
it's obviously correct (e.g. when the patch-id matches).

---

On a semi-related note, I don't see why Git should be warning about
notes.displayRef evaluating to a reference that doesn't exist. It doesn't
exist because I haven't created any notes for that ref in this repository yet.
But that doesn't mean I won't be creating them eventually, and when I do I
want them to be displayed.

For reference, I've been using git v1.9.0. The v1.9.1 release notes don't
mention anything notes-related so I assume these issues still exist.

-Kevin Ballard

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

end of thread, other threads:[~2014-04-07 21:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-07 20:26 notes.rewriteRef doesn't apply to rebases that skip the commit Kevin Ballard
2014-04-07 21:33 ` Junio C Hamano
2014-04-07 21:54   ` Kevin Ballard

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).