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

Re: Small trivial annoyance with the nice new builtin "git am"

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 29, 2016, 17:06 UTC
Message-ID
<xmqqbn1gpe57.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160729002902.GD9646@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 6 quoted lines
> On Thu, Jul 28, 2016 at 04:47:17PM -0700, Junio C Hamano wrote:
>
>> Also makes me wonder if "git cherry-pick A..B" shares the same
>> breakage.
>
> Probably.

It seems that "cherry-pick A..B" leads to sequencer.c::run_git_commit() that uses run_command_v_opt() to drive "git commit", so we are safe.

Show 10 quoted lines
> I guess we want something like:
>
> +void reset_ident_date(void)
> +{
> +	strbuf_reset(&git_default_date);
> +}
> +
>
> and then to sprinkle calls liberally through builtin-ified programs when
> they move from one unit of work to the next.

ident_default_date() is currently the only one that sets this to be cached, and that is to be used only when there is no user-specified date.

When I saw the suggestion first time, I was worried if this had interaction with things like GIT_COMMITTER_DATE environment (because I didn't have easy access to the source) but it is not the case, so the change looks very sensible.

Previous: Junio C HamanoNext: Jeff King
Message 22 of 26 in “Small trivial annoyance with the nice new builtin "git am"”
  1. Linus TorvaldsJul 28, 2016
  2. Junio C HamanoJul 28, 2016
  3. Jeff KingJul 29, 2016
  4. Linus TorvaldsJul 29, 2016
  5. Jeff KingJul 29, 2016
  6. Junio C HamanoJul 29, 2016
  7. reset cached ident date before creating objectsJeff King, Jul 29, 2016
  8. Linus TorvaldsJul 29, 2016
  9. Junio C HamanoJul 29, 2016
  10. Jeff KingJul 29, 2016
  11. Paul TanJul 30, 2016
  12. Jeff KingJul 30, 2016
  13. Junio C HamanoAug 1, 2016
  14. Junio C HamanoAug 1, 2016
  15. Jeff KingAug 1, 2016
  16. Jeff KingAug 1, 2016
  17. Jeff KingAug 1, 2016
  18. Jeff KingAug 1, 2016
  19. Junio C HamanoAug 1, 2016
  20. Jeff KingAug 1, 2016
  21. Junio C HamanoJul 29, 2016
  22. Junio C HamanoJul 29, 2016
  23. Jeff KingJul 29, 2016
  24. Linus TorvaldsJul 29, 2016
  25. Christian CouderJul 29, 2016
  26. Junio C HamanoJul 29, 2016

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.