Re: [PATCH 2/2] date: make "local" orthogonal to date format
- From
Jeff King <peff@peff.net>
- Date
- Aug 31, 2015, 22:05 UTC
- Message-ID
- <20150831220508.GA31973@sigill.intra.peff.net>
- In-Reply-To
- <20150831213336.GA11720@sigill.intra.peff.net>
On Mon, Aug 31, 2015 at 05:33:37PM -0400, Jeff King wrote:
Show 18 quoted lines
> > diff --git a/date.c b/date.c
> > index aa57cad..3aa8002 100644
> > --- a/date.c
> > +++ b/date.c
> > @@ -817,9 +817,7 @@ void parse_date_format(const char *format, struct date_mode *mode)
> > if (!skip_prefix(p, ":", &p))
> > die("date format missing colon separator: %s", format);
> > mode->strftime_fmt = xstrdup(p);
> > - }
> > -
> > - if (*p)
> > + } else if (*p)
> > die("unknown date-mode modifier: %s", p);
>
> Yeah, that works. We could also advance "p" in the DATE_STRFTIME
> conditional, but I think your solution is less ugly.
>
> Thanks for debugging my mess.By the way, I was imagining you would pick these up and add to them with more tests and documentation. If that's the case, please feel free to squash that in and keep my signoff. If not, then I can post a re-roll after waiting for other comments.
-Peff