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

Re: [RESOLVED NOTABUG] "git commit --date" format parsing

From
BTBastien Traverse <bt@esrevart.net>
Date
May 23, 2015, 23:24 UTC
Message-ID
<55610C13.4090802@esrevart.net>
In-Reply-To
<20150522220610.GA21848@peff.net>
Le 23/05/2015 00:06, Jeff King a écrit :
Show 14 quoted lines
> OK, this is weird. When I tried to reproduce, I couldn't. But I had
> typed in the date string myself while reading your email in another
> window.  And though I was sure that I had typed it correctly, just to be
> double-plus-sure I copied and pasted your string. And it failed!
> 
> The date string in your email looks like this (using cut and paste):
> 
>   $ echo 2015-05-21T16∶31+02:00 | xxd
>   00000000: 3230 3135 2d30 352d 3231 5431 36e2 88b6  2015-05-21T16...
>   00000010: 3331 2b30 323a 3030 0a                   31+02:00.
> 
> Your "colon" is actually UTF-8 for code point 	. So git's
> date parser does not recognize it, and punts to approxidate(), which
> does all manner of crazy guessing trying to figure out what you meant.

Okay, this is crazy. Now I can't reproduce it myself either: I just repeated the procedure and date parsing works as expected. The only difference with my last email is that I upgraded and rebooted my system (there was a kernel update for 4.0.4 on Arch... Among other things). I guess that would have reset my keyboard layout, but I swear I tested it multiple times over a few days before posting here.

Anyway, thanks for your insight I would have never figured this myself. I'll be wary of silent unicode character substitution :)

Just for the record:
$ localectl
   System Locale: LANG=fr_FR.UTF8
       VC Keymap: fr
      X11 Layout: fr
     X11 Variant: oss

And I am using the default monospace font in gnome-terminal and gedit. Pretty basic stuff, really.

Thanks again, Bastien

Previous: Jeff King
Message 3 of 3 in “[BUG] "git commit --date" format parsing”
  1. Bastien TraverseMay 22, 2015
  2. Jeff KingMay 22, 2015
  3. Bastien TraverseMay 23, 2015

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.