Re: [ANNOUNCE] Git v2.9.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andreas,

On Tue, 12 Jul 2016, Andreas Schwab wrote:

> Johannes Schindelin <Johannes.Schindelin@xxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]