{"thread":{"id":"34925","subject":"Removing all notes containing a specific string","startedAt":"2013-09-13T06:51:50Z","lastAt":"2013-09-13T15:43:23Z","messageCount":3,"participants":["Francis Moreau","Johan Herland"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"227615","messageId":"CAC9WiBi4=SVF6SE0hpccPLRdv-n8hcRUg+Pa+BbRWN1YudtXjQ@mail.gmail.com","threadId":"34925","inReplyTo":null,"subject":"Removing all notes containing a specific string","fromName":"Francis Moreau","fromEmail":"francis.moro@gmail.com","sentAt":"2013-09-13T06:51:50Z","receivedAt":"2013-09-13T06:51:50Z","isPatch":false,"sender":{"key":"francis.moro@gmail.com","avatar":null},"body":"Hello,\n\nI'd like to know if that's possible to parse all notes to detect a\nspecial string and if it's the case, remove the note like \"git-notes\nremove\" would do.\n\nThanks\n-- \nFrancis\n"},{"id":"227616","messageId":"CALKQrgfX-tEm84h8a2qcaoZuZ0U7BCe34V0HMyuvJHCX72-y=A@mail.gmail.com","threadId":"34925","inReplyTo":"CAC9WiBi4=SVF6SE0hpccPLRdv-n8hcRUg+Pa+BbRWN1YudtXjQ@mail.gmail.com","subject":"Re: Removing all notes containing a specific string","fromName":"Johan Herland","fromEmail":"johan@herland.net","sentAt":"2013-09-13T08:12:14Z","receivedAt":"2013-09-13T08:12:14Z","isPatch":false,"sender":{"key":"johan@herland.net","avatar":"https://avatars.githubusercontent.com/u/547031?v=4"},"body":"On Fri, Sep 13, 2013 at 8:51 AM, Francis Moreau <francis.moro@gmail.com> wrote:\n> Hello,\n>\n> I'd like to know if that's possible to parse all notes to detect a\n> special string and if it's the case, remove the note like \"git-notes\n> remove\" would do.\n\nHi,\n\nThere's no built-in command/option to do this, but the following shell\none-liner should do the job:\n\n  git grep -l $mystring refs/notes/commits | cut -d':' -f2 | tr -d '/'\n| xargs git notes remove\n\n\n...Johan\n\n-- \nJohan Herland, <johan@herland.net>\nwww.herland.net\n"},{"id":"227637","messageId":"CAC9WiBj0SEwZmqjGPpJTzStic0RJ2vLnN39mTenji4rCeyH26A@mail.gmail.com","threadId":"34925","inReplyTo":"CALKQrgfX-tEm84h8a2qcaoZuZ0U7BCe34V0HMyuvJHCX72-y=A@mail.gmail.com","subject":"Re: Removing all notes containing a specific string","fromName":"Francis Moreau","fromEmail":"francis.moro@gmail.com","sentAt":"2013-09-13T15:43:23Z","receivedAt":"2013-09-13T15:43:23Z","isPatch":false,"sender":{"key":"francis.moro@gmail.com","avatar":null},"body":"On Fri, Sep 13, 2013 at 10:12 AM, Johan Herland <johan@herland.net> wrote:\n> On Fri, Sep 13, 2013 at 8:51 AM, Francis Moreau <francis.moro@gmail.com> wrote:\n>> Hello,\n>>\n>> I'd like to know if that's possible to parse all notes to detect a\n>> special string and if it's the case, remove the note like \"git-notes\n>> remove\" would do.\n>\n> Hi,\n>\n> There's no built-in command/option to do this, but the following shell\n> one-liner should do the job:\n>\n>   git grep -l $mystring refs/notes/commits | cut -d':' -f2 | tr -d '/'\n> | xargs git notes remove\n>\n\nLooks \"magic\" to me but does the trick\n\nThanks !\n-- \nFrancis\n"}]}