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

Re: [PATCH 1/3 v2] Add --blob-filter option to filter-branch.

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Apr 23, 2008, 20:22 UTC
Message-ID
<alpine.DEB.1.00.0804232122260.20267@eeepc-johanness>
In-Reply-To
<1208981890-758-1-git-send-email-apenwarr@gmail.com>
Hi,
On Wed, 23 Apr 2008, Avery Pennarun wrote:
Show 31 quoted lines
> From: Jeff King <peff@peff.net>
> 
> This patch allows
> 
>   git filter-branch --blob-filter 'tr a-z A-Z'
> 
> However, it's _still_ horribly slow. Shell script is nice and flexible,
> but running a tight loop like this is just painful. I suspect
> filter-branch in something like perl would be a lot faster and just as
> flexible.
> 
> It is still much better performance than a tree filter, though:
> 
>   $ cd git && time git filter-branch --tree-filter '
>       find . -type f | while read f; do
>         tr a-z A-Z <"$f" >tmp
>         mv tmp "$f"
>       done
>     ' HEAD~10..HEAD
> 
>   real    4m38.626s
>   user    1m32.726s
>   sys     2m51.163s
> 
>   $ cd git && git filter-branch --blob-filter 'tr a-z A-Z' HEAD~10..HEAD
>   real    1m40.809s
>   user    0m36.822s
>   sys     1m14.273s
> 
> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
Thanks, I really appreciate it.

Ciao, Dscho

Previous: Avery PennarunNext: Jeff King
Message 8 of 11 in “Add --blob-filter option to filter-branch.”
  1. 1/3 Add --blob-filter option to filter-branch.Avery Pennarun, Apr 23, 2008
  2. 2/3 Make filter-branch --glob-filter much faster by not calling 'cat'Avery Pennarun, Apr 23, 2008
  3. 3/3 Update documentation to describe git filter-branch --blob-filter.Avery Pennarun, Apr 23, 2008
  4. Johannes SchindelinApr 23, 2008
  5. Avery PennarunApr 23, 2008
  6. Johannes SchindelinApr 23, 2008
  7. 1/3 Add --blob-filter option to filter-branch.Avery Pennarun, Apr 23, 2008
  8. Johannes SchindelinApr 23, 2008
  9. Jeff KingApr 23, 2008
  10. Avery PennarunApr 23, 2008
  11. Jeff KingApr 24, 2008

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.