Re: [ANNOUNCE] Git v2.9.1
- From
- Johannes Schindelin <schindelin@wisc.edu>
- Date
- Jul 12, 2016, 10:57 UTC
- Message-ID
- <alpine.DEB.2.20.1607121249390.6426@virtualbox>
- In-Reply-To
- <mvmtwfve22e.fsf@hawking.suse.de>
Hi Andreas,
On Tue, 12 Jul 2016, Andreas Schwab wrote:
Show 24 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> > @@ -88,11 +88,11 @@ static int local_tzoffset(unsigned long time)
> > return offset * eastwest;
> > }
> >
> > -void show_date_relative(unsigned long time, int tz,
> > +void show_date_relative(time_t time, int tz,
> > const struct timeval *now,
> > struct strbuf *timebuf)
> > {
> > - unsigned long diff;
> > + time_t diff;
> > if (now->tv_sec < time) {
> > strbuf_addstr(timebuf, _("in the future"));
> > return;
> > @@ -100,65 +100,65 @@ void show_date_relative(unsigned long time, int tz,
> > diff = now->tv_sec - time;
> > if (diff < 90) {
> > strbuf_addf(timebuf,
> > - Q_("%lu second ago", "%lu seconds ago", diff), diff);
> > + Q_("%" PRIuMAX " second ago", "%" PRIuMAX " seconds ago", diff), diff);
>
> PRIuMAX isn't compatible with time_t.That statement is wrong. But you probably meant that PRIuMAX is *not necessarily* the correct thing to use.
And I would agree with that. I had to have a patch that 1) compiles and 2) fixes t0006 on Windows, and the patch I presented achieved both goals.
I hoped that my brief "starting point" hint would make it obvious that I do not think that this patch is acceptable?
My idea was to introduce a TIME_T_LARGER_THAN_ULONG and take it from there, but I had to switch contexts before I could finish that part of the patch, yet I still wanted to let y'all know that patches are in the working.
For future record: I appreciate feedback especially when it is constructive, i.e. when "that's wrong" is not left on its own, but is instead followed by "why not do XYZ instead".
Ciao, Johannes