Weird behavior of 'git log --before' or 'git log --date-order': Commits from 2011 are treated to be before 1980

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

 



Dear git development team,

I've spotted a weird behavior of git in a specific repository, which I cannot explain, maybe there is a bug in git.

Repository in which the problem occurs:

git@xxxxxxxxxx:LibreOffice/core.git

Problem:

When ordering the commits in this repository by time via "git log", there are several tens of commits which appear to be before 1980 although their author date and commit date are in 2009 or 2010 or 2011.

Example to reproduce:

git clone git@xxxxxxxxxx:LibreOffice/core.git libreoffice
cd libreoffice
git log --no-merges --before="1980-01-01T00:00:00+0000" --format=%H,%ct,%ci,%ad

All the resulting commits have an author date and commit date in 2009 or 2010 or 2011, though.

This also appears when you order the commits by date:

git log --no-merges --date-order --format=%H,%ct,%ci,%ad

If you search for commit d3b03514dde317473db0d247f21405b5db6a727e in the resulting output, you can see that this commit is placed earlier in the list than the commits from 2008 although its author date and commit date are from 2011. And there are many more commits of this sort between 2009 and 2011 which are placed out of order, interpreted to be earlier than every other commit.

I already searched for broken timestamps in these commits and printed the timestamp in various different formats, but I could not spot anything dubious there. So, why does git log think that these commits have an earlier timestamp than they actually have?

Thanks for your efforts!

[System Info]
git version:
git version 2.30.2 (but I have also tried it with git version 2.40.0 with no difference)
cpu: x86_64
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64
compiler info: gnuc: 10.2
libc info: glibc: 2.31
$SHELL (typically, interactive shell): /bin/bash

Best,
Thomas



[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