From: Junio C Hamano Date: Mon, 5 Oct 2015 19:30:12 +0000 (-0700) Subject: Merge branch 'jk/date-local' X-Git-Tag: v2.7.0-rc0~142 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/7b09c459d346d9bf30ab07921a9b0ee91405d104 Merge branch 'jk/date-local' "git log --date=local" used to only show the normal (default) format in the local timezone. The command learned to take 'local' as an instruction to use the local timezone with other formats, e.g. "git show --date=rfc-local". * jk/date-local: t6300: add tests for "-local" date formats t6300: make UTC and local dates different date: make "local" orthogonal to date format date: check for "local" before anything else t6300: add test for "raw" date format t6300: introduce test_date() helper fast-import: switch crash-report date to iso8601 Documentation/rev-list: don't list date formats Documentation/git-for-each-ref: don't list date formats Documentation/config: don't list date formats Documentation/blame-options: don't list date formats --- 7b09c459d346d9bf30ab07921a9b0ee91405d104 diff --cc t/t6300-for-each-ref.sh index 7c9bec7630,d6c9e627ac..03873b09d1 --- a/t/t6300-for-each-ref.sh +++ b/t/t6300-for-each-ref.sh @@@ -235,16 -255,14 +255,24 @@@ test_expect_success 'Check format of st test_cmp expected actual ' + test_expect_success 'Check format of strftime-local date fields' ' + echo "my date is 2006-07-03" >expected && + git for-each-ref \ + --format="%(authordate:format-local:my date is %Y-%m-%d)" \ + refs/heads >actual && + test_cmp expected actual + ' + +test_expect_success 'exercise strftime with odd fields' ' + echo >expected && + git for-each-ref --format="%(authordate:format:)" refs/heads >actual && + test_cmp expected actual && + long="long format -- $_z40$_z40$_z40$_z40$_z40$_z40$_z40" && + echo $long >expected && + git for-each-ref --format="%(authordate:format:$long)" refs/heads >actual && + test_cmp expected actual +' + cat >expected <<\EOF refs/heads/master refs/remotes/origin/master