git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junio@pobox.com>
To: Heikki Orsila <heikki.orsila@iki.fi>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Add format.date config variable
Date: Wed, 21 May 2008 11:24:42 -0700	[thread overview]
Message-ID: <7vtzgr347p.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 20080518171306.GA12948@zakalwe.fi

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

  parent reply	other threads:[~2008-05-21 18:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-18 17:13 [PATCH] Add format.date config variable Heikki Orsila
2008-05-18 17:39 ` Teemu Likonen
2008-05-21 18:24 ` Junio C Hamano [this message]
2008-05-21 23:27   ` Heikki Orsila

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vtzgr347p.fsf@gitster.siamese.dyndns.org \
    --to=junio@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=heikki.orsila@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).