Re: [PATCH 3/3] t0006-date.sh: add `human` date format tests.
- From
- Stephen P. Smith <ischis2@cox.net>
- Date
- Jan 3, 2019, 23:57 UTC
- Message-ID
- <2344590.WcCB8NM0fh@thunderbird>
- In-Reply-To
- <xmqq1s5th0u4.fsf@gitster-ct.c.googlers.com>
On Thursday, January 3, 2019 2:45:39 PM MST Junio C Hamano wrote:
Show 13 quoted lines
> Philip Oakley <philipoakley@iee.org> writes: > >> > >> check_human_date 432000 "$THIS_YEAR_REGEX" # 5 days ago > > > > Just a quick bikeshed: if used, would this have a year end 5 day > > roll-over error potential, or will it always use the single date? > > Hmph, interesting point. Indeed, date.c::show_date_normal() decides > to hide the year portion if the timestamp and the current time share > the same year, so on Thu Jan 3rd, an attempt to show a commit made > on Mon Dec 31st of the same week would end up showing the year, so > yes, I agree with you that the above would break. >
Thanks Philip.
I wrote the test just before the new year so didn't see the rollover. I haven't run the test this year. sps