Re: Removing all notes containing a specific string

2013-09-13 Thread Francis Moreau
On Fri, Sep 13, 2013 at 10:12 AM, Johan Herland  wrote:
> On Fri, Sep 13, 2013 at 8:51 AM, Francis Moreau  
> wrote:
>> Hello,
>>
>> I'd like to know if that's possible to parse all notes to detect a
>> special string and if it's the case, remove the note like "git-notes
>> remove" would do.
>
> Hi,
>
> There's no built-in command/option to do this, but the following shell
> one-liner should do the job:
>
>   git grep -l $mystring refs/notes/commits | cut -d':' -f2 | tr -d '/'
> | xargs git notes remove
>

Looks "magic" to me but does the trick

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


Re: Removing all notes containing a specific string

2013-09-13 Thread Johan Herland
On Fri, Sep 13, 2013 at 8:51 AM, Francis Moreau  wrote:
> Hello,
>
> I'd like to know if that's possible to parse all notes to detect a
> special string and if it's the case, remove the note like "git-notes
> remove" would do.

Hi,

There's no built-in command/option to do this, but the following shell
one-liner should do the job:

  git grep -l $mystring refs/notes/commits | cut -d':' -f2 | tr -d '/'
| xargs git notes remove


...Johan

-- 
Johan Herland, 
www.herland.net
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Removing all notes containing a specific string

2013-09-12 Thread Francis Moreau
Hello,

I'd like to know if that's possible to parse all notes to detect a
special string and if it's the case, remove the note like "git-notes
remove" would do.

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