Re: [PATCH 2/2] read-cache: use time_t instead of unsigned long

2018-11-13 Thread Junio C Hamano
Carlo Marcelo Arenas Belón writes: > There are still some more possible improvements around this code but > they are orthogonal to this change : > > * migrate to approxidate_careful or parse_expiry_date > * maybe make sure only approxidate are used for expiration > > Changes in v2: > * improved

Re: [PATCH 2/2] read-cache: use time_t instead of unsigned long

2018-11-13 Thread Carlo Arenas
On Tue, Nov 13, 2018 at 12:49 AM Johannes Schindelin wrote: > On Mon, 12 Nov 2018, Carlo Marcelo Arenas Belón wrote: >> > > if time_t can't represent a valid time keep the indexes for failsafe > > Is this sentence incomplete? What are those "indexes"? the indexes that are created when

Re: [PATCH 2/2] read-cache: use time_t instead of unsigned long

2018-11-13 Thread Johannes Schindelin
Hi, On Mon, 12 Nov 2018, Carlo Marcelo Arenas Belón wrote: > There are still some more possible improvements around this code but > they are orthogonal to this change : > > * migrate to approxidate_careful or parse_expiry_date > * maybe make sure only approxidate are used for expiration > >

[PATCH 2/2] read-cache: use time_t instead of unsigned long

2018-11-12 Thread Carlo Marcelo Arenas Belón
There are still some more possible improvements around this code but they are orthogonal to this change : * migrate to approxidate_careful or parse_expiry_date * maybe make sure only approxidate are used for expiration Changes in v2: * improved commit message as suggested by Eric * failsafe

Re: [PATCH 2/2] read-cache: use time_t instead of unsigned long

2018-11-12 Thread Junio C Hamano
Johannes Schindelin writes: >> Given that the function returns the value obtained from >> approxidate(), which is approxidate_careful() in disguise, time_t is >> not as appropriate as timestamp_t, no? >> >> IOW, what if time_t were narrower than timestamp_t? > > Rght. From the patch, I had

Re: [PATCH 2/2] read-cache: use time_t instead of unsigned long

2018-11-12 Thread Johannes Schindelin
Hi, On Mon, 12 Nov 2018, Junio C Hamano wrote: > Carlo Marcelo Arenas Belón writes: > > > b968372279 ("read-cache: unlink old sharedindex files", 2017-03-06) > > introduced get_shared_index_expire_date using unsigned long to track > > the modification times of a shared index. > > > >

Re: [PATCH 2/2] read-cache: use time_t instead of unsigned long

2018-11-12 Thread Junio C Hamano
Carlo Marcelo Arenas Belón writes: > b968372279 ("read-cache: unlink old sharedindex files", 2017-03-06) > introduced get_shared_index_expire_date using unsigned long to track > the modification times of a shared index. > > dddbad728c ("timestamp_t: a new data type for timestamps", 2017-04-26)

Re: [PATCH 2/2] read-cache: use time_t instead of unsigned long

2018-11-12 Thread Eric Sunshine
On Mon, Nov 12, 2018 at 3:41 AM Carlo Marcelo Arenas Belón wrote: > b968372279 ("read-cache: unlink old sharedindex files", 2017-03-06) > introduced get_shared_index_expire_date using unsigned long to track > the modification times of a shared index. > > dddbad728c ("timestamp_t: a new data type

[PATCH 2/2] read-cache: use time_t instead of unsigned long

2018-11-12 Thread Carlo Marcelo Arenas Belón
b968372279 ("read-cache: unlink old sharedindex files", 2017-03-06) introduced get_shared_index_expire_date using unsigned long to track the modification times of a shared index. dddbad728c ("timestamp_t: a new data type for timestamps", 2017-04-26) shows why that might problematic so move to