From: Shengfa Lin Date: Fri, 02 Oct 2020 06:37:16 GMT Subject: Re: [RFC PATCH 1/1] hideTimezone: add a user.hideTimezone config Message-ID: <20201002063716.4087336-1-shengfa@google.com> In-Reply-To: Junio C Hamano writes: > > I think (haven't actually tested) "git commit --date=" option > is handled the same way, i.e. comparing these two would be a way not > to touch the environment variable. > > TZ=UTC-09 git commit --date=@1600000000 ... && > TZ=UTC-09 git -c user.hideTimeZone=true commit --date=@1600000000 ... && > git show -s --format='%aI' HEAD~1 >output0 && > git show -s --format='%aI' HEAD~0 >output1 Like this? test_expect_fail '...' ' echo t1 >file && git add file && TZ=UTC-09 git commit --date=@1600000000 -m "t1" && echo t2 >>file && git add file && TZ=UTC-09 git -c user.hideTimeZone=true commit --date=@1600000000 -m "t2" && git show -s --format='%aI' HEAD~1 >output0 && git show -s --format='%aI' HEAD~0 >output1 && test_cmp output0 output1 ' I tested it.