提交 e54c5ea9 编写于 作者: B Brad Roberts 提交者: Junio C Hamano

[PATCH] fix null TZ problems on os/x

It seems that the localtime() libc routine doesn't care for finding a TZ
that's empty.  It's ok with TZ not being set.  Setting the TZ to GMT allowed
these tests to pass.

$ uname -v
Darwin Kernel Version 7.9.0: Wed Mar 30 20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC
Signed-off-by: NBrad Roberts <braddr@puremagic.com>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 31f584c2
...@@ -32,7 +32,7 @@ test_expect_success \ ...@@ -32,7 +32,7 @@ test_expect_success \
GIT_COMMITTER_NAME="Committer Name" \ GIT_COMMITTER_NAME="Committer Name" \
GIT_COMMITTER_EMAIL="committer@email" \ GIT_COMMITTER_EMAIL="committer@email" \
GIT_COMMITTER_DATE="2005-05-26 23:30" \ GIT_COMMITTER_DATE="2005-05-26 23:30" \
TZ= git-commit-tree `cat treeid` >commitid 2>/dev/null' TZ=GMT git-commit-tree `cat treeid` >commitid 2>/dev/null'
test_expect_success \ test_expect_success \
'read commit' \ 'read commit' \
......
...@@ -41,7 +41,7 @@ test_expect_success \ ...@@ -41,7 +41,7 @@ test_expect_success \
find a -type l | xargs git-update-cache --add && find a -type l | xargs git-update-cache --add &&
treeid=`git-write-tree` && treeid=`git-write-tree` &&
echo $treeid >treeid && echo $treeid >treeid &&
TZ= GIT_COMMITTER_DATE="2005-05-27 22:00:00" \ TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \
git-commit-tree $treeid </dev/null >.git/HEAD' git-commit-tree $treeid </dev/null >.git/HEAD'
test_expect_success \ test_expect_success \
...@@ -50,7 +50,7 @@ test_expect_success \ ...@@ -50,7 +50,7 @@ test_expect_success \
test_expect_success \ test_expect_success \
'validate file modification time' \ 'validate file modification time' \
'TZ= tar tvf b.tar a/a | 'TZ=GMT tar tvf b.tar a/a |
awk \{print\ \$4,\ \(length\(\$5\)\<7\)\ ?\ \$5\":00\"\ :\ \$5\} \ awk \{print\ \$4,\ \(length\(\$5\)\<7\)\ ?\ \$5\":00\"\ :\ \$5\} \
>b.mtime && >b.mtime &&
echo "2005-05-27 22:00:00" >expected.mtime && echo "2005-05-27 22:00:00" >expected.mtime &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册