[hackers] [sbase] tar: Skip over git's global pax header crap || sin
 
commit 201e71be2b4ed0edaba2e45f5825ff5b5974d270
Author: sin <sin_AT_2f30.org>
Date:   Thu Apr 23 00:04:55 2015 +0100
    tar: Skip over git's global pax header crap
diff --git a/tar.c b/tar.c
index b2a4d9f..d2e6495 100644
--- a/tar.c
+++ b/tar.c
_AT_@ -339,6 +339,14 @@ xt(int argc, char *argv[], int (*fn)(char *, ssize_t, char[BLKSIZ]))
                         }
                 }
 
+		/* ignore global pax header craziness */
+		if (h->type == 'g') {
+			for (; size > 0; size -= BLKSIZ)
+				if (fread(b, BLKSIZ, 1, tarfile) != 1)
+					eprintf("fread %s:", tarfilename);
+			continue;
+		}
+
                 fn(fname, size, b);
         }
         if (ferror(tarfile))
Received on Thu Apr 23 2015 - 01:05:31 CEST
This archive was generated by hypermail 2.3.0
: Thu Apr 23 2015 - 01:12:13 CEST