git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] git-sh-setup: refactor ident-parsing functions

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 12, 2012, 20:32 UTC
Message-ID
<7vr4nyh89x.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20121112201235.GA7210@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 16 quoted lines
> On Mon, Nov 12, 2012 at 12:08:37PM -0800, Junio C Hamano wrote:
>
>> Jeff King <peff@peff.net> writes:
>> 
>> > Changing the interface for get_author_ident_from_commit would be a pain,
>> > but if we just wanted to help filter-branch, we could do something like
>> > this:
>> 
>> Yes, that is the direction I was alluding to.
>> 
>> Callers of get_author_ident_from_commit can also do the same and
>> avoid rebuilding the same $pick_author_script over and over again,
>> or get_author_ident_from_commit can do so for its callers.
>
> I don't think get_author_ident_from_commit can do so on demand due to
> the subshell issue I mentioned.
OK, that is what I obviously missed.
> I wonder if we should simply generate these at build time and store them
> in the script.

Yeah, my knee-jerk reaction was that it was wasteful to run script at runtime to build a constant string, but the engineering cost may not be worth it.

Previous: Jeff KingNext: Jeff King
Message 18 of 24 in “What can cause empty GIT_AUTHOR_NAME for 'git filter-branch --tree-filter' on Solaris?”
  1. Ilya BasinOct 17, 2012
  2. Jeff KingOct 17, 2012
  3. Johannes SixtOct 17, 2012
  4. Re[2]: What can cause empty GIT_AUTHOR_NAME for 'git filter-branch --tree-filter' on Solaris?Ilya Basin, Oct 17, 2012
  5. Re[3]: What can cause empty GIT_AUTHOR_NAME for 'git filter-branch --tree-filter' on Solaris?Ilya Basin, Oct 17, 2012
  6. Jeff KingOct 17, 2012
  7. Jeff KingOct 17, 2012
  8. Johannes SixtOct 18, 2012
  9. Jeff KingOct 18, 2012
  10. Junio C HamanoOct 18, 2012
  11. Jeff KingOct 18, 2012
  12. 0/2 clean up filter-branch ident parsingJeff King, Oct 18, 2012
  13. 1/2 git-sh-setup: refactor ident-parsing functionsJeff King, Oct 18, 2012
  14. Junio C HamanoNov 12, 2012
  15. Jeff KingNov 12, 2012
  16. Junio C HamanoNov 12, 2012
  17. Jeff KingNov 12, 2012
  18. Junio C HamanoNov 12, 2012
  19. 2/2 filter-branch: use git-sh-setup's ident parsing functionsJeff King, Oct 18, 2012
  20. Johannes SixtOct 18, 2012
  21. Jeff KingOct 18, 2012
  22. Jeff KingOct 18, 2012
  23. Jeff KingOct 18, 2012
  24. 2/2 filter-branch: use git-sh-setup's ident parsing functionsJeff King, Oct 18, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.