[PATCH 0/2] clean up filter-branch ident parsing
- From
Jeff King <peff@peff.net>
- Date
- Oct 18, 2012, 07:22 UTC
- Message-ID
- <20121018072207.GA1605@sigill.intra.peff.net>
- In-Reply-To
- <20121018060847.GB6308@sigill.intra.peff.net>
On Thu, Oct 18, 2012 at 02:08:47AM -0400, Jeff King wrote:
> Working on it now. git-sh-setup works, but chasing an annoying bug in > filter-branch. I'm sure it's something silly and stupid.
Ugh. I was being caught by crazy dash-versus-bash stuff.
Try this:
$ bash -c 'echo "\\\\"' \\ $ dash -c 'echo "\\\\"' \
It's the "echo will automatically do backslash escaping" magic we have so often enjoyed. I solved it with printf.
Patches to follow.
My primary motivation was cleanup, but it also has a net reduction of 5 fork+execs for each commit that filter-branch processes. This dropped the run-time of "git filter-branch HEAD -1000" on my linux box from 62s to 47s. A real filter-branch would do more work in the filters, of course, but that translates to 7.5 minutes of time saved if you are filtering all 30,000 commits of git.git.
[1/2]: git-sh-setup: refactor ident-parsing functions [2/2]: filter-branch: use git-sh-setup's ident parsing functions
-Peff