Re: [PATCH v3 2/4] archive-tar: write extended headers for file sizes >= 8GB
- From
Jeff King <peff@peff.net>
- Date
- Jun 24, 2016, 19:10 UTC
- Message-ID
- <20160624191044.GB32118@sigill.intra.peff.net>
- In-Reply-To
- <xmqqwplefm2r.fsf@gitster.mtv.corp.google.com>
On Fri, Jun 24, 2016 at 12:01:16PM -0700, Junio C Hamano wrote:
Show 10 quoted lines
> > @@ -267,7 +281,13 @@ static int write_tar_entry(struct archiver_args *args,
> > memcpy(header.linkname, buffer, size);
> > }
> >
> > - prepare_header(args, &header, mode, size);
> > + size_in_header = size;
> > + if (S_ISREG(mode) && size > 077777777777UL) {
>
> Want a symbolic constant with a comment that says why you have
> eleven 7's?I tried instead to make sure we only mention it once to avoid a symbolic constant (even though the same constant appears in the next patch, too, it would be a mistake to give them the same name; they just happen to be the same size).
So if anything, I would put a comment here, explaining that ustar cannot handle anything larger than this, and POSIX mandates it (but I didn't because the commit message already goes into much more detail).
-Peff