Re: [PATCH] Add date format --local-zone
From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:06
Hi, On Tue, 24 Apr 2007, Junio C Hamano wrote:
quoted hunk ↗ jump to hunk
--- 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.
quoted hunk ↗ jump to hunk
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