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

Re: [PATCH] git-filter-branch: add --egrep-filter option

From
Phil Hord <hordp@cisco.com>
Date
Apr 19, 2011, 16:03 UTC
Message-ID
<4DADB241.1060602@cisco.com>
In-Reply-To
<20110419080143.GA17915@elie>
On 04/19/2011 04:01 AM, Jonathan Nieder wrote:
Show 12 quoted lines
> Hi,
>
> Michael O'Cleirigh wrote:
>
>> After considering your comment I have to agree with you that it is a
>> special case of index-filter and probably not useful/general for
>> enough other cases to justify adding in a new command line option.
> Now, why do you give up so easily? ;-)
>
> Surely what your patch is hinting at is the possibility of an
> --ls-tree-filter (for lack of a better name) that works with trees
> without the overhead of unpacking them.

I have invented something similar[*] for git three different times in three different ways. The last one is the fastest and uses git-fast-import instead of filter-branch, but I was sure one of the filter-branch methods would have been more efficient. More examples would be very welcome.

Phil

[*] My implementations mostly focused on applying a ".gitignore" file to the repo history. I spent many hours on this. I wound up with a script that also handles file and branch renaming (the latter important so I can run different filters on the same repo and drop results into different branches). It's not patch-worthy (yet), but I would have loved to have more examples along the way such as the mktree one you just provided.

Previous: Jonathan Nieder
Message 5 of 5 in “git-filter-branch: add --egrep-filter option”
  1. git-filter-branch: add --egrep-filter optionMichael O'Cleirigh, Apr 15, 2011
  2. Johannes SixtApr 16, 2011
  3. Michael O'CleirighApr 17, 2011
  4. Jonathan NiederApr 19, 2011
  5. Phil HordApr 19, 2011

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.