On Fri, Oct 12, 2012 at 04:49:54PM +0200, Enrico Weigelt wrote:
> > 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
I didn't look closely at your individual problem, but that example has
proven flaky before. There were some simpler formulations given in this
In particular, Junio suggested:
git filter-branch --index-filter '
rm -f "$GIT_INDEX_FILE"
git read-tree --prefix=newsubdir/ "$GIT_COMMIT"
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html