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_TMPIt 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