git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/5] Date Mode: Add --time-zone; deprecate --date=local
@ 2011-04-20  2:53 Michael Witten
  2011-04-20  2:45 ` [RFC 1/5] Light refactoring of date infrastructure Michael Witten
                   ` (5 more replies)
  0 siblings, 6 replies; 37+ messages in thread
From: Michael Witten @ 2011-04-20  2:53 UTC (permalink / raw)
  To: git

One of the possible values for a date format is `local', which
specifies that a date should be output as though the date format
were instead `default' but in terms of the user's time zone
instead of the time zone stored by git; clearly, then, `local'
does not really provide just another format, but rather the
combination of 2 specifications:

  * A format for the date (`default')
  * A time zone in which to interpret the date (`local', if you will)

Interestingly, the existing documentation suggests that the original
purpose of the `--date' option was to specify the time zone rather
than a format:

  $ git grep -hC1 '`--date=local`\|`--date=default`' \
  >   6ceb270ce6f65cf4bc2a22830f96e0cc838b3fec       \
  >   -- Documentation/rev-list-options.txt
  +
  `--date=local` shows timestamps in user's local timezone.
  +
  --
  +
  `--date=default` shows timestamps in the original timezone
  (either committer's or author's).

This patch series reimplements the original purpose of `--date' by allowing
the time zone mode to be specified independently of the date format
(see the commit message for [2] and the documentation provided by [3]):

  [0] Light refactoring of date infrastructure
  [1] Pretty Print: show tz when using DATE_LOCAL
  [2] Date Mode: Implementation
  [3] Date Mode: Documentation
  [4] Date Mode: Tests

The date format `local' has thus been deprecated, though it is still
supported (with a warning on stderr).

These patches apply cleanly to the current tip of Junio's `next' branch:

  commit 63e4ee5f87eede11d1377370c385c26c5b90c6e7
  Merge: 359ea0b 6ceb270
  Author: Junio C Hamano <gitster@pobox.com>
  Date:   Tue Apr 19 11:51:25 2011 -0700
  
      Merge branch 'master' into next
      
      * master:
        Git 1.7.5-rc3
        Git 1.7.4.5
        git-svn.txt: Document --mergeinfo
  
and it would appear that `make test' runs successfully (including the
extensive testing that I have implemented for date mode features, both
old and new).

There are some whitespace warnings (a la `git diff --check'), but I
have reviewed them and personally approve of them; if you think that
appraisal is incorrect, then you don't know what you're talking about :-P

Sincerely,
Michael Witten

  Documentation/blame-options.txt    |    9 +--
  Documentation/config.txt           |   32 ++++---
  Documentation/date-mode-docs.txt   |   87 +++++++++++++++++++
  Documentation/git-for-each-ref.txt |   19 ++++-
  Documentation/git-log.txt          |   43 ---------
  Documentation/git-rev-list.txt     |    4 +-
  Documentation/git-svn.txt          |    2 +-
  Documentation/rev-list-options.txt |   28 +------
  archive.c                          |    2 +-
  builtin/blame.c                    |   24 +++---
  builtin/cat-file.c                 |    3 +-
  builtin/commit.c                   |    2 +-
  builtin/for-each-ref.c             |   65 ++++++++++----
  builtin/log.c                      |   17 ++--
  builtin/shortlog.c                 |    2 +-
  builtin/show-branch.c              |    3 +-
  cache.h                            |   41 ++++++++-
  commit.h                           |    4 +-
  date.c                             |   84 ++++++++++++++++---
  fast-import.c                      |    4 +-
  http-backend.c                     |    3 +-
  log-tree.c                         |   10 ++-
  pretty.c                           |   18 +++--
  reflog-walk.c                      |    6 +-
  reflog-walk.h                      |    4 +-
  refs.c                             |    6 +-
  revision.c                         |   11 ++-
  revision.h                         |    4 +-
  sha1_name.c                        |    5 +-
  submodule.c                        |    2 +-
  t/date-modes-lib.sh                |  168 ++++++++++++++++++++++++++++++++++++
  t/date-modes-permutator.perl       |   94 ++++++++++++++++++++
  t/t4202-log.sh                     |    3 +
  t/t6300-for-each-ref.sh            |   15 +++-
  t/t8002-blame.sh                   |    9 ++
  test-date.c                        |   11 ++-
  36 files changed, 654 insertions(+), 190 deletions(-)
  create mode 100644 Documentation/date-mode-docs.txt
  create mode 100755 t/date-modes-lib.sh
  create mode 100755 t/date-modes-permutator.perl

-- 
1.7.4.18.g68fe8

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2011-04-25 18:30 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-20  2:53 [RFC 0/5] Date Mode: Add --time-zone; deprecate --date=local Michael Witten
2011-04-20  2:45 ` [RFC 1/5] Light refactoring of date infrastructure Michael Witten
2011-04-20  2:45 ` [RFC 2/5] Pretty Print: show tz when using DATE_LOCAL Michael Witten
2011-04-21 22:34   ` Junio C Hamano
2011-04-22 14:08     ` Dates in Commits and other issues of style (Re: [RFC 2/5] Pretty Print: show tz when using DATE_LOCAL) Michael Witten
2011-04-25  1:26       ` Miles Bader
2011-04-25  3:57         ` Junio C Hamano
2011-04-25 10:45           ` Jakub Narebski
2011-04-25 18:29             ` Junio C Hamano
2011-04-22 14:36     ` [RFC 2/5] Pretty Print: show tz when using DATE_LOCAL Michael Witten
2011-04-22 15:06       ` Junio C Hamano
2011-04-20  2:45 ` [RFC 3/5] Date Mode: Implementation Michael Witten
2011-04-21 22:44   ` Junio C Hamano
2011-04-20  2:45 ` [RFC 4/5] Date Mode: Documentation Michael Witten
2011-04-20  2:45 ` [RFC 5/5] Date Mode: Tests Michael Witten
2011-04-21 22:44   ` Junio C Hamano
2011-04-23  3:42     ` Michael Witten
2011-04-23  5:06       ` Michael Witten
2011-04-23  3:45     ` Time zone option name (Re: [RFC 5/5] Date Mode: Tests) Michael Witten
2011-04-23  5:27       ` Junio C Hamano
2011-04-23  3:59   ` [RFC 5/5] Date Mode: Tests Michael Witten
2011-04-20  6:43 ` [RFC 0/5] Date Mode: Add --time-zone; deprecate --date=local Jeff King
2011-04-20 14:21   ` Michael Witten
2011-04-21  1:50     ` Junio C Hamano
2011-04-21  2:14       ` Michael Witten
2011-04-21  3:57         ` Junio C Hamano
2011-04-21  4:09           ` Michael Witten
2011-04-20 14:22   ` Michael Witten
2011-04-20 14:22   ` Michael Witten
2011-04-20 14:23   ` Michael Witten
2011-04-21  0:07     ` Tabs and spaces (Re: [RFC 0/5] Date Mode: Add --time-zone; deprecate --date=local) Jonathan Nieder
2011-04-21  1:51       ` Tabs and spaces Michael Witten
2011-04-21  2:18         ` Jonathan Nieder
2011-04-21  3:15           ` Michael Witten
2011-04-21  3:25             ` Thiago Farina
2011-04-21 10:46               ` Alex Riesen
2011-04-21 12:57                 ` Michael Witten

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).