Re: [PATCH 3/6] Introduce a new "printf format" for timestamps

2017-03-01 Thread Junio C Hamano
Junio C Hamano writes: > Johannes Schindelin writes: > >> So let's introduce the pseudo format "PRItime" (currently simply being >> "lu") so that it is easy later on to change the data type to time_t. > > The problem being solved is a good thing to solve, and > >> -printf("author-time %lu\n

Re: [PATCH 3/6] Introduce a new "printf format" for timestamps

2017-03-01 Thread Junio C Hamano
Johannes Schindelin writes: > So let's introduce the pseudo format "PRItime" (currently simply being > "lu") so that it is easy later on to change the data type to time_t. The problem being solved is a good thing to solve, and > - printf("author-time %lu\n", ci.author_time); > + printf

[PATCH 3/6] Introduce a new "printf format" for timestamps

2017-02-27 Thread Johannes Schindelin
Currently, Git's source code treats all timestamps as if they were unsigned longs. Therefore, it is okay to write "%lu" when printing them. There is a substantial problem with that, though: at least on Windows, time_t is *larger* than unsigned long, and hence we will want to switch to using time_t