Re: [PATCH] Add date format --local-zone
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Apr 25, 2007, 12:40 UTC
- Message-ID
- <Pine.LNX.4.64.0704251438000.6954@racer.site>
- In-Reply-To
- <1177482982542-git-send-email-junkio@cox.net>
Hi,
On Tue, 24 Apr 2007, Junio C Hamano wrote:
Show 15 quoted lines
> --- a/revision.c
> +++ b/revision.c
> @@ -1111,7 +1111,11 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
> continue;
> }
> if (!strcmp(arg, "--relative-date")) {
> - revs->relative_date = 1;
> + revs->date_mode = DATE_RELATIVE;
> + continue;
> + }
> + if (!strcmp(arg, "--local-zone")) {
> + revs->date_mode = DATE_LOCAL;
> continue;
> }
> I think that it will become more convenient at some stage to add "--date=local", and have a common option parser in date.c.
Show 10 quoted lines
> diff --git a/revision.h b/revision.h
> index 5b41e2d..8f8720a 100644
> --- a/revision.h
> +++ b/revision.h
> @@ -64,7 +64,7 @@ struct rev_info {
> /* Format info */
> unsigned int shown_one:1,
> abbrev_commit:1,
> - relative_date:1;
> + date_mode:2;Why not go the full nine yards, and make this a full int? It's not like rev_info is allocated a million times...
Ciao, Dscho