git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [BUG] minor: wrong handling of GIT_AUTHOR_DATE

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 17, 2008, 02:46 UTC
Message-ID
<7vr68obbpd.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.LFD.1.10.0808161613520.3324@nehalem.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 6 quoted lines
> Junio, your call. But this one gets the date right for strings that just 
> randomly have some big number in them, ie
>
> 	[torvalds@nehalem git]$ ./test-date "17:25:54 917476713 2008-06-04 -0700"
> 	17:25:54 917476713 2008-06-04 -0700 -> 1212625554 -0700 -> Wed Jun  4 17:25:54 2008
> 	17:25:54 917476713 2008-06-04 -0700 -> Wed Jun  4 17:25:54 2008
Being able to parse this is a very low priority.

You've taught people here and on the kernel list that the "date" can use any non-digit-non-word as a word separator, and "git log --since 2.days" is something you often do.

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.

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.

Previous: Linus TorvaldsNext: Junio C Hamano
Message 4 of 10 in “[BUG] minor: wrong handling of GIT_AUTHOR_DATE”
  1. Hermann GaustererAug 16, 2008
  2. Linus TorvaldsAug 16, 2008
  3. Linus TorvaldsAug 16, 2008
  4. Junio C HamanoAug 17, 2008
  5. Junio C HamanoAug 17, 2008
  6. Linus TorvaldsAug 17, 2008
  7. Linus TorvaldsAug 17, 2008
  8. Junio C HamanoAug 17, 2008
  9. Linus TorvaldsAug 17, 2008
  10. Linus TorvaldsAug 17, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.