git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Removing all notes containing a specific string

From
FMFrancis Moreau <francis.moro@gmail.com>
Date
Sep 13, 2013, 15:43 UTC
Message-ID
<CAC9WiBj0SEwZmqjGPpJTzStic0RJ2vLnN39mTenji4rCeyH26A@mail.gmail.com>
In-Reply-To
<CALKQrgfX-tEm84h8a2qcaoZuZ0U7BCe34V0HMyuvJHCX72-y=A@mail.gmail.com>
On Fri, Sep 13, 2013 at 10:12 AM, Johan Herland <johan@herland.net> wrote:
Show 15 quoted lines
> On Fri, Sep 13, 2013 at 8:51 AM, Francis Moreau <francis.moro@gmail.com> 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
Previous: Johan Herland
Message 3 of 3 in “Removing all notes containing a specific string”
  1. Francis MoreauSep 13, 2013
  2. Johan HerlandSep 13, 2013
  3. Francis MoreauSep 13, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.