Re: What can cause empty GIT_AUTHOR_NAME for 'git filter-branch --tree-filter' on Solaris?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 18, 2012, 06:06 UTC
- Message-ID
- <7vk3uomi0c.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20121018053656.GA6308@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
> On Thu, Oct 18, 2012 at 07:31:35AM +0200, Johannes Sixt wrote: > >> Right. But we should really be doing something like this instead to save a >> few subprocesses. >> [...] >> - eval "$(set_ident AUTHOR <../commit)" || >> + eval "$(set_ident AUTHOR author <../commit)" || > > I cringe a little at losing DRY-ness to avoid processes.
Well, the header field token "author" and the middle word of the variable GIT_AUTHOR_NAME _happen_ to be the same modulo case, but they did not have to be, so you could argue the updated set_ident implementation is more generally useful (you could even argue that we should spell the first parameter out as "GIT_AUTHOR_NAME" and "GIT_AUTHOR_EMAIL", two separate parameters).
Show 5 quoted lines
> Speaking of repetition, this seems like almost the exact same parsing > that happens in git-sh-setup's get_author_ident_from_commit. Maybe it's > worth merging them. I suspect you could also avoid another process > by parsing out both author and committer information in the same sed > invocation.
Yes, yes and yes.