Skip to content

experiment with commit option record-time-zone

Shengfa Lin git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 5 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Adding a record-time-zone command option for commitbuiltin/am.c builtin/blame.c builtin/commit.c +13 more+107 -515 replies
2/2Demonstrate failing and passing testst/t7514-commit-patch.sh+22 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [WIP v2 0/2] experiment with commit option record-time-zone

My current understanding is that we should start with providing command options first and if they prove to be useful, we can progress with config such as user.recordTimeZone. Also, we wanted to save the timestamp as -0000 when user specify not to record time zone so to distinguish with +0000(user from UTC time zone).

Experimenting to support command option --[no-]record-time-zone, currently only added for commit command; the plan is to add it to other time zone recording command such as rebase, pull and merge. Documentation change is also missing.

I added three tests where the first two are failing. I am not sure why they are failing. I am guessing the datestamp method is not called when specifying the date or GIT_AUTHOR_DATE. Also, I am not sure the correct handling of all the show_date calls yet. Anyway, I wanted to share WIP before delaying longer.

Shengfa Lin (2):
Adding a record-time-zone command option for commit Demonstrate failing and passing tests

 builtin/am.c            |  2 +-
 builtin/blame.c         |  4 +-
 builtin/commit.c        |  3 +-
 builtin/fast-import.c   |  2 +-
 builtin/show-branch.c   |  2 +-
 builtin/tag.c           |  2 +-
 cache.h                 | 10 +++--
 date.c                  | 96 ++++++++++++++++++++++++++++-------------
 http-backend.c          |  2 +-
 pretty.c                |  6 ++-
 ref-filter.c            |  2 +-
 reflog-walk.c           |  2 +-
 refs.c                  |  6 ++-
 sha1-name.c             |  2 +-
 t/helper/test-date.c    |  8 ++--
 t/t7514-commit-patch.sh | 28 ++++++++++++
 16 files changed, 126 insertions(+), 51 deletions(-)
Signature · 1 line
2.28.0.1011.ga647a8990f-goog