Skip to content

approxidate and future ISO-like times

Jeff King git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2pass TIME_DATE_NOW to approxidate future-checkdate.c+10 -70 replies
2/2approxidate: allow ISO-like dates far in the futuredate.c t/t0006-date.sh+19 -136 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] approxidate and future ISO-like times
Quoted 14 lines · Jeff King
Quoted 5 lines · Colin Smith

Apologies if this has already been raised or PEBCAK, but I've noticed a bug where git log with certain date ranges breaks things. It appears to be any --since date with a --until date in the future between 2014-12-01 and 2014-12-09. Dates from 2014-12-10 appear to work, and so does the date 2015-12-01.

Ugh. Approxidate strikes again:

for i in 2014-11-01 2013-12-01 2014-12-01; do
./test-date approxidate $i
done

Quoted 8 lines

produces:

2014-11-01 -> 2014-11-01 09:35:19 +0000
2013-12-01 -> 2013-12-01 09:35:19 +0000
2014-12-01 -> 2014-01-12 09:35:19 +0000

The first two are right, but the fourth one is not. It's probably something simple and stupid.

Less simple and stupid than I thought, but I think I have a fix. It is not about December specifically, but about the date being in the future. The first patch is a cleanup to help us more accurately test the bug; the interesting bits are in the second one.

[1/2]: pass TIME_DATE_NOW to approxidate future-check [2/2]: approxidate: allow ISO-like dates far in the future

-Peff