Re: What can cause empty GIT_AUTHOR_NAME for 'git filter-branch --tree-filter' on Solaris?
- From
Jeff King <peff@peff.net>
- Date
- Oct 18, 2012, 06:08 UTC
- Message-ID
- <20121018060847.GB6308@sigill.intra.peff.net>
- In-Reply-To
- <7vk3uomi0c.fsf@alter.siamese.dyndns.org>
On Wed, Oct 17, 2012 at 11:06:11PM -0700, Junio C Hamano wrote:
Show 11 quoted lines
> >> - 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).
True, though that is even more work for the caller (and *_DATE, too). We could make it "GIT_AUTHOR", but I don't think there is much point in being that level of half-way general. The caller can always pick it out of the variables if they really want to do something tricky.
Show 7 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.
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.
-Peff