Re: Transfer notes when rebasing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 4, 2013 at 9:59 AM, John Keeping <john@xxxxxxxxxxxxx> wrote:
> On Wed, Sep 04, 2013 at 03:53:10AM -0400, Jeff King wrote:
>> On Wed, Sep 04, 2013 at 09:51:26AM +0200, Francis Moreau wrote:
>>
>> > When rebasing a branch which contains commits with notes onto another
>> > branch it happens that some commits are already presents in the target
>> > branch.
>> >
>> > In that case git-rebase correctly drops those (already present)
>> > commits but it also drops the notes associated with them.
>> >
>> > Can the notes be transfered somehow in the target branch on the
>> > already present commits ?
>>
>> Yes, see the notes.rewriteRef config option to enable this.
>
> Does that actually work for this case?  It sounds like Francis has the
> notes copying correctly when commits are rewritten but the notes are not
> copied anywhere if the commit becomes empty.

I don't think so:

$ git config -l
...
notes.rewriteref=refs/notes/*

$ git notes show
note 1

$ git checkout -b target master~1
Switched to a new branch 'target'

$ git cherry-pick -x master
[target 93740ff] commit 6 (cherry picked from commit
5dc90209d7c0195dd9d671c234c49c903b9e1b10)
 1 file changed, 1 insertion(+)

$ git rebase target master
First, rewinding head to replay your work on top of it...

$ git notes show
error: No note found for object 93740ff96b37b2ed7aa0a78861c8beb87fdad474.

Thanks
-- 
Francis
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]