git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [Bug?] git notes are not copied during rebase
@ 2016-11-16 23:38 Norbert Kiesel
  2016-11-17 10:30 ` SZEDER Gábor
  0 siblings, 1 reply; 2+ messages in thread
From: Norbert Kiesel @ 2016-11-16 23:38 UTC (permalink / raw)
  To: git

Hi,

I am currently a heavy user of rebasing and noticed that my notes
don't get correctly applied, even if notes.rewrite.rebase is set
explicitly to true (though manual says that is the default).

Below is a use case that shows that a commit on a branch got rebased,
but the note was not copied to the new commit.

% mkdir notes
% cd notes
% git init
Initialized empty Git repository in /tmp/notes/.git/
% date
% git add a
% git commit -m c1
[master (root-commit) 2e24a91] c1
 1 file changed, 1 insertion(+)
 create mode 100644 a
% git checkout -b mybranch
Switched to a new branch 'mybranch'
% date
% git add b
% git commit -m c2
[mybranch 5ef9954] c2
 1 file changed, 1 insertion(+)
 create mode 100644 b
% git notes add -m note1
% git log
commit 5ef9954 (HEAD -> mybranch)
Author: Norbert Kiesel <nkiesel@metricstream.com>
Date:   Mon Nov 14 15:48:00 2016 -0800

    c2

Notes:
    note1

commit 2e24a91 (master)
Author: Norbert Kiesel <nkiesel@metricstream.com>
Date:   Mon Nov 14 15:48:00 2016 -0800

    c1
% git notes
c39895a0948c17df2028f07c3ec0993a532edabf
5ef9954dbadddfccefe95277be5e7a995335124b
% git checkout master
Switched to branch 'master'
% date
% git commit -a -m c3
[master 1368832] c3
 1 file changed, 1 insertion(+)
% git rebase master mybranch
First, rewinding head to replay your work on top of it...
Applying: c2
% git log
commit 8921cb7 (HEAD -> mybranch)
Author: Norbert Kiesel <nkiesel@metricstream.com>
Date:   Mon Nov 14 15:48:00 2016 -0800

    c2

commit 1368832 (master)
Author: Norbert Kiesel <nkiesel@metricstream.com>
Date:   Mon Nov 14 15:48:00 2016 -0800

    c3

commit 2e24a91
Author: Norbert Kiesel <nkiesel@metricstream.com>
Date:   Mon Nov 14 15:48:00 2016 -0800

    c1
% git notes
c39895a0948c17df2028f07c3ec0993a532edabf
5ef9954dbadddfccefe95277be5e7a995335124b

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

* Re: [Bug?] git notes are not copied during rebase
  2016-11-16 23:38 [Bug?] git notes are not copied during rebase Norbert Kiesel
@ 2016-11-17 10:30 ` SZEDER Gábor
  0 siblings, 0 replies; 2+ messages in thread
From: SZEDER Gábor @ 2016-11-17 10:30 UTC (permalink / raw)
  To: Norbert Kiesel; +Cc: SZEDER Gábor, git

> I am currently a heavy user of rebasing and noticed that my notes
> don't get correctly applied, even if notes.rewrite.rebase is set
> explicitly to true (though manual says that is the default).

Setting 'notes.rewrite.rebase' is, as you mentioned, not necessary,
but not sufficient either.  See here, especially the second paragraph:

   notes.rewriteRef
       When copying notes during a rewrite, specifies the (fully
       qualified) ref whose notes should be copied. May be a glob, in
       which case notes in all matching refs will be copied. You may also
       specify this configuration several times.

       Does not have a default value; you must configure this variable to
       enable note rewriting.

       Can be overridden with the GIT_NOTES_REWRITE_REF environment
       variable.

Gábor


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

end of thread, other threads:[~2016-11-17 10:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-16 23:38 [Bug?] git notes are not copied during rebase Norbert Kiesel
2016-11-17 10:30 ` SZEDER Gábor

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).