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

Re: filter-branch IO optimization

From
Enrico Weigelt <enrico.weigelt@vnc.biz>
Date
Oct 12, 2012, 14:49 UTC
Message-ID
<9de87aac-7e15-48d9-832a-e9a030c5ed43@zcs>
In-Reply-To
<878vbc21f3.fsf@pctrast.inf.ethz.ch>
Hi,
> The usual advice is "use an index-filter instead".  It's *much*
> faster
> than a tree filter.  However:

I've tried the last example from git-filter-branch manpage, but failed. Seems like the GIT_INDEX_FILE env variable doesnt get honoured by git-update-index, no index.new file created, and so mv call fails.

My second try (as index-filter command) was:
git ls-files -s > ../_INDEX_TMP
cat ../_INDEX_TMP |
    sed "s-\t\"*-&addons/-" |
    git update-index --index-info
rm -f ../_INDEX_TMP

It works fine in the worktree (i see files renamed in the index), but no success when running it as --index-filter. Seems the index file isn't used at all (or some completely different one).

By the way, inside the index filter, GIT_INDEX_FILTER here is
/home/devel/vnc/openerp/workspace/pkg/openerp-extra-bundle.git/.git-rewrite/t/../index

Obviously a different (temporary) index file, while many examples on the web, suggesting to use commands like 'git add --cached' or 'git rm --cached' _without_ passing GIT_INDEX_FILTER variable.

Could there be some bug that this variable isn't honored properly everywhere ?

-- Mit freundlichen Grüßen / Kind regards

Enrico Weigelt VNC - Virtual Network Consult GmbH Head Of Development

Pariser Platz 4a, D-10117 Berlin
Tel.: +49 (30) 3464615-20
Fax: +49 (30) 3464615-59
enrico.weigelt@vnc.biz; www.vnc.de
Previous: Thomas RastNext: Enrico Weigelt
Message 4 of 7 in “filter-branch IO optimization”
  1. Enrico WeigeltOct 11, 2012
  2. Johannes SixtOct 11, 2012
  3. Thomas RastOct 11, 2012
  4. Enrico WeigeltOct 12, 2012
  5. Enrico WeigeltOct 12, 2012
  6. Enrico WeigeltOct 12, 2012
  7. Jeff KingOct 12, 2012

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.