# bugreport: git does not like subseconds

4 messages from 2008-11-13 to 2008-11-13. Participants: Jan Engelhardt, Linus Torvalds, Junio C Hamano.
Thread: https://gitlist.dev/t/16306

## Jan Engelhardt, 2008-11-13 16:26

Subject: bugreport: git does not like subseconds
Message-ID: <alpine.LNX.1.10.0811131722360.13330@fbirervta.pbzchgretzou.qr>
URL: https://gitlist.dev/e/alpine.LNX.1.10.0811131722360.13330%40fbirervta.pbzchgretzou.qr

```


Git does not like subseconds in $GIT_{AUTHOR,COMMITTER}_DATE,
and somehow does time travel instead. Perhaps this is a Glibc
limitation? Running openSUSE 11's glibc-2.8(which is actually
a 2.7 snapshot I think: glibc-2.8-2008042513.tar.bz2).


$ git init
Initialized empty Git repository in /dev/shm/f/.git/
$ echo tomato >banana.c
$ git add banana.c
$ GIT_AUTHOR_DATE="2008-11-11 19:36:33.983771268 +0100" git ci -m 'foo'
Created initial commit e65a6b0: foo
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 banana.c
$ git log
commit e65a6b06c2ff3ef458cb16e7ee6f17ef39757538
Author: Jan Engelhardt <jengelh@medozas.de>
Date:   Mon Mar 5 06:47:48 2001 +0100

    foo

```

## Linus Torvalds, 2008-11-13 16:45

Subject: Re: bugreport: git does not like subseconds
Message-ID: <alpine.LFD.2.00.0811130842550.3468@nehalem.linux-foundation.org>
URL: https://gitlist.dev/e/alpine.LFD.2.00.0811130842550.3468%40nehalem.linux-foundation.org
In-Reply-To: <alpine.LNX.1.10.0811131722360.13330@fbirervta.pbzchgretzou.qr>

```


On Thu, 13 Nov 2008, Jan Engelhardt wrote:
> 
> 
> Git does not like subseconds in $GIT_{AUTHOR,COMMITTER}_DATE,
> and somehow does time travel instead. Perhaps this is a Glibc
> limitation? Running openSUSE 11's glibc-2.8(which is actually
> a 2.7 snapshot I think: glibc-2.8-2008042513.tar.bz2).

This should have been fixed by 9f2b6d2936a7c4bb3155de8efec7b10869ca935e 
("date/time: do not get confused by fractional seconds").

But maybe that hasn't made it into any release yet? It's in master, but 
maybe it never made it into stable? Junio?

		Linus

```

## Jan Engelhardt, 2008-11-13 16:57

Subject: Re: bugreport: git does not like subseconds
Message-ID: <alpine.LNX.1.10.0811131752450.16134@fbirervta.pbzchgretzou.qr>
URL: https://gitlist.dev/e/alpine.LNX.1.10.0811131752450.16134%40fbirervta.pbzchgretzou.qr
In-Reply-To: <alpine.LFD.2.00.0811130842550.3468@nehalem.linux-foundation.org>

```

On Thursday 2008-11-13 17:45, Linus Torvalds wrote:
>On Thu, 13 Nov 2008, Jan Engelhardt wrote:
>> 
>> Git does not like subseconds in $GIT_{AUTHOR,COMMITTER}_DATE,
>> and somehow does time travel instead. Perhaps this is a Glibc
>> limitation? Running openSUSE 11's glibc-2.8(which is actually
>> a 2.7 snapshot I think: glibc-2.8-2008042513.tar.bz2).
>
>This should have been fixed by 9f2b6d2936a7c4bb3155de8efec7b10869ca935e 
>("date/time: do not get confused by fractional seconds").
>
>But maybe that hasn't made it into any release yet? It's in master, but 
>maybe it never made it into stable? Junio?

Seems so:

$ git describe 9f2b6d2936a7c4bb3155de8efec7b10869ca935e
v1.6.0-3-g9f2b6d2

$ git merge-base 9f2b6d2936a7c4bb3155de8efec7b10869ca935e v1.6.0.3
result: dba9194a49452b5f093b96872e19c91b50e526aa

$ git describe dba9194a49452b5f093b96872e19c91b50e526aa
v1.6.0-1-gdba9194

Which means it's not in; -forest also verifies it:

[v1.6.0.x goes here]
^
│
├ │     │ mailinfo: re-fix MIME multipart boundary parsing
│ │   ┌─│─[fix]──date/time: do not get confused by fractional seconds
│ │   ├ │ Start 1.6.1 cycle
├─≡───┘ │
├ │     │ Start 1.6.0.X maintenance series
├─│─────│─[v1.6.0]──GIT 1.6.0

```

## Junio C Hamano, 2008-11-13 17:09

Subject: Re: bugreport: git does not like subseconds
Message-ID: <7v1vxfh7sh.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v1vxfh7sh.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <alpine.LFD.2.00.0811130842550.3468@nehalem.linux-foundation.org>

```
Linus Torvalds <torvalds@linux-foundation.org> writes:

> On Thu, 13 Nov 2008, Jan Engelhardt wrote:
>> 
>> 
>> Git does not like subseconds in $GIT_{AUTHOR,COMMITTER}_DATE,
>> and somehow does time travel instead. Perhaps this is a Glibc
>> limitation? Running openSUSE 11's glibc-2.8(which is actually
>> a 2.7 snapshot I think: glibc-2.8-2008042513.tar.bz2).
>
> This should have been fixed by 9f2b6d2936a7c4bb3155de8efec7b10869ca935e 
> ("date/time: do not get confused by fractional seconds").
>
> But maybe that hasn't made it into any release yet? It's in master, but 
> maybe it never made it into stable? Junio?

No it didn't.

Actually I didn't even think of that as a bug, in the sense that git never
accepted fractional seconds and feeding such to git was a user error from
day one; iow, 9f2b6d2 (date/time: do not get confused by fractional
seconds, 2008-08-16) was an idiotproofing ;-)

But I'd agree perhaps we should cherry pick that one.

```
