Re: git-notes, how do they work?

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

 



On Sat, May 12, 2012 at 5:43 PM, Ulrich Spoerlein <uspoerlein@xxxxxxxxx> wrote:
> IIUC refs/notes/commits points to the latest note, which points to HEAD.
> However, there's no reference that points to the note pointing to
> HEAD^1, so how will it not be garbage collected?

No. refs/notes/commits points to a commit, whose tree contains all
notes at the last time a note is changed. This commit has a parent
commit that stores note snapshot of the previous change and so on..

refs/notes/commits is an ordinary ref, which is searched for
reachability at gc time, so all notes (even replaced notes) cannot be
deleted.

> How can it be pushed to a remote repository?

What I wrote about were my findings while I studied the notes code.
I'm new to it too. And I believe there's no mechanism to transfer
notes. Of course you can transfer resfs/notes/commits like any other
refs, but the objects those notes are attached to might or might not
exist at destination repo.

> I understand that notes cannot point to older notes, as that would make
> removing/adding notes from/to older commits quite a hassle.
>
> So, what am I doing wrong here? How can I avoid notes from disappearing
> so that each and every one of it remains in the repo?
-- 
Duy
--
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]