Re: [PATCH] Add format.date config variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Heikki Orsila <heikki.orsila@xxxxxx> 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.

> 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.

> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux