From: Junio C Hamano Date: Fri, 29 Jul 2016 17:06:44 GMT Subject: Re: Small trivial annoyance with the nice new builtin "git am" Message-ID: In-Reply-To: <20160729002902.GD9646@sigill.intra.peff.net> Jeff King writes: > 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. > 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.