Re: [PATCH v3 3/4] archive-tar: write extended headers for far-future mtime

2016-06-24 Thread Jeff King
On Fri, Jun 24, 2016 at 12:06:59PM -0700, Junio C Hamano wrote: > > + if (args->time > 0777UL) { > > + strbuf_append_ext_header_uint(_header, "mtime", > > + args->time); > > + args->time = 0777UL; > > + } > > + > > +

Re: [PATCH v3 3/4] archive-tar: write extended headers for far-future mtime

2016-06-24 Thread Junio C Hamano
Jeff King writes: > There's a slight bit of trickiness there. We may already be > ... > After writing the extended header, we munge the timestamp in > the ustar headers to the maximum-allowable size. This is > wrong, but it's the least-wrong thing we can provide to a > tar

[PATCH v3 3/4] archive-tar: write extended headers for far-future mtime

2016-06-23 Thread Jeff King
The ustar format represents timestamps as seconds since the epoch, but only has room to store 11 octal digits. To express anything larger, we need to use an extended header. This is exactly the same case we fixed for the size field in the previous commit, and the solution here follows the same