Re: [BUG] minor: wrong handling of GIT_AUTHOR_DATE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Sat, 16 Aug 2008, Junio C Hamano wrote:
> 
> People who followed that advice would have gotten used to this already, e.g.
> 
>    $ git reflog delete master@{07.04.2005.15:15:00.-0700}
> 
> should not be broken.

Hmm. Fair enough. In that case, just the "nodate()" approach is probably 
fine on its own. HOWEVER:

> I think your first hunk needs to distinguish between "very-long-precision
> posint" (in which case we ignore because it is likely to be nanoseconds
> fraction) and others.

Well, that ignores nanosecond resolution seconds, but not microseconds, 
for example. Now, microseconds normally don't matter (because they won't 
trigger the 'seconds-since-epoch' case), but they _can_ trigger some other 
cases.

For example, let's assume that we have microseconds in the date specifier. 
Then try this one:

	./test-date "12:12:12.000001"

Notice what happens? Oops.

With my patch, you get

	12:12:12.0000001 -> Sat Aug 16 12:12:12 2008

and with your, you get

	12:12:12.000001 -> Fri Aug  1 12:12:12 2008

and yeah, it's odd, but I can explain it.

But you are definitely right about the case of doing

	"15:15:00.-0700"

and yes, my patch was crap too. 

			Linus
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux