{"thread":{"id":"34971","subject":"Save notes state when releasing","startedAt":"2013-09-20T05:38:17Z","lastAt":"2013-09-23T07:25:05Z","messageCount":3,"participants":["Francis Moreau","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"227927","messageId":"CAC9WiBh3ha61M789DL==Nch30P_mvGwDLODqNzwaAbmHtyhPkQ@mail.gmail.com","threadId":"34971","inReplyTo":null,"subject":"Save notes state when releasing","fromName":"Francis Moreau","fromEmail":"francis.moro@gmail.com","sentAt":"2013-09-20T05:38:17Z","receivedAt":"2013-09-20T05:38:17Z","isPatch":false,"sender":{"key":"francis.moro@gmail.com","avatar":null},"body":"Hello,\n\nI'm using notes in my project. I'm wondering if it's possible to save\nthe state of the notes when I'm releasing/tagging a new version of my\nproject so I can restore the saved notes state if I checkout back the\nold release.\n\nTherefore I would be able to inspect notes (which may have been\nremoved or modified after the release) as they were when the release\nhappened.\n\nThanks\n-- \nFrancis\n"},{"id":"227933","messageId":"20130920103401.GB21684@sigill.intra.peff.net","threadId":"34971","inReplyTo":"CAC9WiBh3ha61M789DL==Nch30P_mvGwDLODqNzwaAbmHtyhPkQ@mail.gmail.com","subject":"Re: Save notes state when releasing","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-09-20T10:34:01Z","receivedAt":"2013-09-20T10:34:01Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Sep 20, 2013 at 07:38:17AM +0200, Francis Moreau wrote:\n\n> I'm using notes in my project. I'm wondering if it's possible to save\n> the state of the notes when I'm releasing/tagging a new version of my\n> project so I can restore the saved notes state if I checkout back the\n> old release.\n> \n> Therefore I would be able to inspect notes (which may have been\n> removed or modified after the release) as they were when the release\n> happened.\n\nThe notes are stored as git trees, so you can point a \"tag\" ref at a\nparticular state, just as you would with a normal branch. The \"git tag\"\ncommand expects to create refs under \"refs/tags\", whereas \"git notes\"\nexpects to find notes under \"refs/notes\". The simplest thing is to just\nuse \"git update-ref\" rather than \"git tag\" to create the pointer. Like:\n\n  $ git update-ref refs/notes/v1.0 refs/notes/commits\n\nand then you can always view the v1.0 notes as:\n\n  $ git --notes=v1.0 log\n\nYou can even set the notes.displayRef config to always show v1.0 notes\nwhen they are available for a commit. Though if they are a subset of the\ncurrent notes, you would expect to see duplicates. Depending on what you\nare storing in your notes, you may want to clean out your notes tree\nafter the release.\n\n-Peff\n"},{"id":"228067","messageId":"CAC9WiBiOAediWzgLsjcH=gorwtzrUSHumZQ3f8xk3gsestyXMw@mail.gmail.com","threadId":"34971","inReplyTo":"20130920103401.GB21684@sigill.intra.peff.net","subject":"Re: Save notes state when releasing","fromName":"Francis Moreau","fromEmail":"francis.moro@gmail.com","sentAt":"2013-09-23T07:25:05Z","receivedAt":"2013-09-23T07:25:05Z","isPatch":false,"sender":{"key":"francis.moro@gmail.com","avatar":null},"body":"On Fri, Sep 20, 2013 at 12:34 PM, Jeff King <peff@peff.net> wrote:\n> On Fri, Sep 20, 2013 at 07:38:17AM +0200, Francis Moreau wrote:\n>\n>> I'm using notes in my project. I'm wondering if it's possible to save\n>> the state of the notes when I'm releasing/tagging a new version of my\n>> project so I can restore the saved notes state if I checkout back the\n>> old release.\n>>\n>> Therefore I would be able to inspect notes (which may have been\n>> removed or modified after the release) as they were when the release\n>> happened.\n>\n> The notes are stored as git trees, so you can point a \"tag\" ref at a\n> particular state, just as you would with a normal branch. The \"git tag\"\n> command expects to create refs under \"refs/tags\", whereas \"git notes\"\n> expects to find notes under \"refs/notes\". The simplest thing is to just\n> use \"git update-ref\" rather than \"git tag\" to create the pointer. Like:\n>\n>   $ git update-ref refs/notes/v1.0 refs/notes/commits\n>\n> and then you can always view the v1.0 notes as:\n>\n>   $ git --notes=v1.0 log\n>\n> You can even set the notes.displayRef config to always show v1.0 notes\n> when they are available for a commit. Though if they are a subset of the\n> current notes, you would expect to see duplicates. Depending on what you\n> are storing in your notes, you may want to clean out your notes tree\n> after the release.\n\nThank you Jeff, that's what I was needing.\n-- \nFrancis\n"}]}