Subject: Re: [PATCH v3 2/4] approxidate: alias "today" to "now"

From: Tuomas Ahola <[email-masked]>
Date: Fri, 15 May 2026 08:02:43 +0300

Junio C Hamano <[email-masked]> wrote:

> Junio C Hamano <[email-masked]> writes:
> 
> > Tuomas Ahola <[email-masked]> writes:
> >
> >> Junio C Hamano <[email-masked]> wrote:
> >>
> >>> Tuomas Ahola <[email-masked]> 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.

Well, that's not far off from what I wrote.  I just meant we cannot
make the current (somewhat accidental) behaviour official *just because*
it happens to be the status quo.

> 
> 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.

Roger that.