From: Hermann Gausterer <git-mailinglist@mrq1.org>
To: Git Mailinglist <git@vger.kernel.org>
Cc: Hermann Gausterer <git-mailinglist@mrq1.org>
Subject: [BUG] minor: wrong handling of GIT_AUTHOR_DATE
Date: Sat, 16 Aug 2008 22:53:25 +0200 [thread overview]
Message-ID: <20080816205325.GD10729@mrq1.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 960 bytes --]
hi
i found a minor bug in the handling of the
environment variable GIT_AUTHOR_DATE
i used this variable to import an old project.
i used "stat" to get the timestamp of a file
and set the git history to this date with
this command:
GIT_AUTHOR_DATE=`stat -c '%y' "$FILE"`
old files (created with an older kernel)
produced this output.
2008-05-28 14:21:35.000000000 +0200
but new files return nanosecond resolution
timestamps.
2008-06-04 17:25:54.917476713 +0200
of course this resolution is NOT needed
for git, but git DOES NOT ignore this time-
stamps. it changes the date to something
completly wrong :-/
steps to reproduce:
$ git init
$ touch test
$ stat -c %y test
2008-08-16 22:25:45.491701924 +0200
$ export GIT_AUTHOR_DATE=`stat -c %y test`
$ git add test
$ git commit -a
$ git log
commit 56f92b8f6efc7bdaa5abdf03a8c5dbf79dd1fdff
Author: Hermann Gausterer <git-bugreport@mrq1.org>
Date: Thu Aug 1 01:52:04 1985 +0200
test
$
mfg hermann
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2008-08-16 21:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-16 20:53 Hermann Gausterer [this message]
2008-08-16 23:03 ` [BUG] minor: wrong handling of GIT_AUTHOR_DATE Linus Torvalds
2008-08-16 23:17 ` Linus Torvalds
2008-08-17 2:46 ` Junio C Hamano
2008-08-17 3:13 ` Junio C Hamano
2008-08-17 4:25 ` Linus Torvalds
2008-08-17 4:37 ` Linus Torvalds
2008-08-17 5:27 ` Junio C Hamano
2008-08-17 16:07 ` Linus Torvalds
2008-08-17 3:50 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080816205325.GD10729@mrq1.org \
--to=git-mailinglist@mrq1.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.