Thread (4 messages) flat view 4 messages, 4 authors, 2016-06-15

Re: [PATCH] Add format.date config variable

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:38

Heikki Orsila [off-list ref] writes:
format.date config variable sets the default date-time mode for the log
command. Setting format.date value is similar to using git log's --date
option.

Also, add missing "short" alternative to --date in rev-list-options.txt.
Good change but is a separate issue.  Please make it a [PATCH 1/2].
---
Lacking Sign-off.
I wanted to read all the logs in ISO 8601 time format so I decided to 
implement this option.
Good intention.
quoted hunk ↗ jump to hunk
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 217980f..ddc68bd 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -573,6 +573,12 @@ fetch.unpackLimit::
 	especially on slow filesystems.  If not set, the value of
 	`transfer.unpackLimit` is used instead.
 
+format.date::
+	Set default date-time mode for the log command. Setting format.date
+	value is similar to using git log's --date option. The value is one of
+	following alternatives: {relative,local,default,iso,rfc,short}.
+	See linkgit:git-log[1].
+
Look at other "format.*" variables --- notice that most of them are about
"format-patch" command?  And you absolutely do NOT want this "default date
format for log family" to apply to "format-patch" command.
quoted hunk ↗ jump to hunk
diff --git a/builtin-log.c b/builtin-log.c
index 9d046b2..d3ff8f6 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -18,6 +18,9 @@
The patch itself is good, especially that you made sure that format-patch
output is not affected.

As to the configuration variable name, I'd suggest "log.date" instead.  We
may have to deprecate format.pretty and move it to something else for
consistency, though.  Just like we do not want "format.date" applied to
format-patch, we never want "format.pretty" apply to it either.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help