Merge branch 'jk/date-local'
authorJunio C Hamano <gitster@pobox.com>
Mon, 5 Oct 2015 19:30:12 +0000 (12:30 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 5 Oct 2015 19:30:13 +0000 (12:30 -0700)
"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

1  2 
Documentation/config.txt
Documentation/git-for-each-ref.txt
Documentation/git-rev-list.txt
Documentation/rev-list-options.txt
builtin/blame.c
cache.h
fast-import.c
t/t6300-for-each-ref.sh
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc builtin/blame.c
Simple merge
diff --cc cache.h
Simple merge
diff --cc fast-import.c
Simple merge
index 7c9bec76302259beebeea7521b9c74acfe6de264,d6c9e627acd9d7ee997790ef71bd5aa7db53c90f..03873b09d1a4480549e1b8ab92fc3780fb874d89
@@@ -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