Re: Small trivial annoyance with the nice new builtin "git am"
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 29, 2016, 18:10 UTC
- Message-ID
- <CAPc5daX5FrUyk2UMJ47iPFwGbg_ru+GAny4uqrBL20k=uyO5Hg@mail.gmail.com>
- In-Reply-To
- <CA+55aFzRBQNU80ukcAk2JjbeWTvo8jHxejBeWWPjrHHuX7ygSQ@mail.gmail.com>
On Thu, Jul 28, 2016 at 5:37 PM, Linus Torvalds <torvalds@linux-foundation.org> wrote:
Show 18 quoted lines
> On Thu, Jul 28, 2016 at 5:29 PM, Jeff King <peff@peff.net> wrote:
>>
>> I guess we want something like:
>>
>> +void reset_ident_date(void)
>> +{
>> + strbuf_reset(&git_default_date);
>> +}
>
> Looks sane.
>
>> and then to sprinkle calls liberally through builtin-ified programs when
>> they move from one unit of work to the next.
>
> Maybe we can just add it to the end of commit_tree_extended(), and
> just say "the cache is reset between commits".
>
> That way there is no sprinking in random places.Hmph, wouldn't that equally work well if we cleared at the beginning of the function, instead of at the end?