Re: [PATCH v3 2/4] approxidate: alias "today" to "now"
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 15, 2026, 01:38 UTC
- Message-ID
- <xmqqa4u1e9k9.fsf@gitster.g>
- In-Reply-To
- <xmqqik8pea39.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 31 quoted lines
> Tuomas Ahola <taahol@utu.fi> writes: > >> Junio C Hamano <gitster@pobox.com> wrote: >> >>> Tuomas Ahola <taahol@utu.fi> writes: >>> >>> > Sorry, I don't know if I understood. Does the patch change the behavior of >>> > that command somehow? Is there some kind of edge case I missed? >>> >>> No, I did not think it was a good idea to carve the behaviour in >>> stone that "git log --since=today" behaves as if it were given "git >>> log --since=now". My reaction would have been very different if we >>> were deliberatly and explicitly saying "today is synonym for now", >>> but the thing is, it is not a designed behaviour but what >>> approxidate does for anything it does not understand, e.g. >>> >>> git log --since=decay >>> git log --since=bogus >>> >>> all behave as if it were given --since=now. >> >> Thanks for spelling that out. So, as there is no deliberative >> decision behind the current behaviour of "today", the code has >> to remain non-committed on that; we are not at liberty to codify >> the status quo. Right? > > Not right. It is more like "Even though we try not to change > existing behavoiur left and right without a good reason to avoid > breaking existing users' expectations, we should be able to "fix" > what is not intended behaviour but is something the code happened to > be doing, especially if the current behaviour does not make sense.
And the other half of the discussion is that once we explicitly say "today means right now" and make it official, it makes it much harder to fix it later. So we need to be very careful in our first attempt.