summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-10-05 19:30:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-10-05 19:30:13 (GMT)
commit7b09c459d346d9bf30ab07921a9b0ee91405d104 (patch)
treebfbb19307f204ca82609d0fcbb281aacb6277e4c /Documentation
parent297ae7151f85b677e58d6804d35e88d1375abaeb (diff)
parent99264e93fc87bdd61f646c53878782947d476da8 (diff)
downloadgit-7b09c459d346d9bf30ab07921a9b0ee91405d104.zip
git-7b09c459d346d9bf30ab07921a9b0ee91405d104.tar.gz
git-7b09c459d346d9bf30ab07921a9b0ee91405d104.tar.bz2
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
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/blame-options.txt5
-rw-r--r--Documentation/config.txt4
-rw-r--r--Documentation/git-for-each-ref.txt5
-rw-r--r--Documentation/git-rev-list.txt2
-rw-r--r--Documentation/rev-list-options.txt23
5 files changed, 22 insertions, 17 deletions
diff --git a/Documentation/blame-options.txt b/Documentation/blame-options.txt
index a09969b..760eab7 100644
--- a/Documentation/blame-options.txt
+++ b/Documentation/blame-options.txt
@@ -63,11 +63,10 @@ include::line-range-format.txt[]
`-` to make the command read from the standard input).
--date <format>::
- The value is one of the following alternatives:
- {relative,local,default,iso,rfc,short}. If --date is not
+ Specifies the format used to output dates. If --date is not
provided, the value of the blame.date config variable is
used. If the blame.date config variable is also not set, the
- iso format is used. For more information, See the discussion
+ iso format is used. For supported values, see the discussion
of the --date option at linkgit:git-log[1].
-M|<num>|::
diff --git a/Documentation/config.txt b/Documentation/config.txt
index e935cbd..4d3cb10 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -1829,9 +1829,7 @@ log.abbrevCommit::
log.date::
Set the default date-time mode for the 'log' command.
Setting a value for log.date is similar to using 'git log''s
- `--date` option. Possible values are `relative`, `local`,
- `default`, `iso`, `rfc`, and `short`; see linkgit:git-log[1]
- for details.
+ `--date` option. See linkgit:git-log[1] for details.
log.decorate::
Print out the ref names of any commits that are shown by the log
diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt
index e49d578..d6a1abc 100644
--- a/Documentation/git-for-each-ref.txt
+++ b/Documentation/git-for-each-ref.txt
@@ -150,9 +150,8 @@ the object referred by the ref does not cause an error. It
returns an empty string instead.
As a special case for the date-type fields, you may specify a format for
-the date by adding one of `:default`, `:relative`, `:short`, `:local`,
-`:iso8601`, `:rfc2822` or `:raw` to the end of the fieldname; e.g.
-`%(taggerdate:relative)`.
+the date by adding `:` followed by date format name (see the
+values the `--date` option to linkgit::git-rev-list[1] takes).
EXAMPLES
diff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt
index 7b49c85..ef22f17 100644
--- a/Documentation/git-rev-list.txt
+++ b/Documentation/git-rev-list.txt
@@ -45,7 +45,7 @@ SYNOPSIS
[ --regexp-ignore-case | -i ]
[ --extended-regexp | -E ]
[ --fixed-strings | -F ]
- [ --date=(local|relative|default|iso|iso-strict|rfc|short) ]
+ [ --date=<format>]
[ [ --objects | --objects-edge | --objects-edge-aggressive ]
[ --unpacked ] ]
[ --pretty | --header ]
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index f1c5220..4f009d4 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -701,15 +701,19 @@ include::pretty-options.txt[]
--relative-date::
Synonym for `--date=relative`.
---date=(relative|local|default|iso|iso-strict|rfc|short|raw)::
+--date=<format>::
Only takes effect for dates shown in human-readable format, such
as when using `--pretty`. `log.date` config variable sets a default
- value for the log command's `--date` option.
+ value for the log command's `--date` option. By default, dates
+ are shown in the original time zone (either committer's or
+ author's). If `-local` is appended to the format (e.g.,
+ `iso-local`), the user's local time zone is used instead.
+
`--date=relative` shows dates relative to the current time,
-e.g. ``2 hours ago''.
+e.g. ``2 hours ago''. The `-local` option cannot be used with
+`--raw` or `--relative`.
+
-`--date=local` shows timestamps in user's local time zone.
+`--date=local` is an alias for `--date=default-local`.
+
`--date=iso` (or `--date=iso8601`) shows timestamps in a ISO 8601-like format.
The differences to the strict ISO 8601 format are:
@@ -732,10 +736,15 @@ format, often found in email messages.
`--date=format:...` feeds the format `...` to your system `strftime`.
Use `--date=format:%c` to show the date in your system locale's
preferred format. See the `strftime` manual for a complete list of
-format placeholders.
+format placeholders. When using `-local`, the correct syntax is
+`--date=format-local:...`.
+
-`--date=default` shows timestamps in the original time zone
-(either committer's or author's).
+`--date=default` is the default format, and is similar to
+`--date=rfc2822`, with a few exceptions:
+
+ - there is no comma after the day-of-week
+
+ - the time zone is omitted when the local time zone is used
ifdef::git-rev-list[]
--header::