]> granicus.if.org Git - git/commit
import-tars: read overlong names from pax extended header
authorPedro Alvarez Piedehierro <palvarez89@gmail.com>
Wed, 23 May 2018 22:54:17 +0000 (23:54 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 May 2018 23:35:51 +0000 (08:35 +0900)
commit12ecea46e3a7542918efaf595fd866e74d3dba3d
treedeb11a565a4421c2b796340f0c3782a047cc316e
parent468165c1d8a442994a825f3684528361727cd8c0
import-tars: read overlong names from pax extended header

Importing gcc tarballs[1] with import-tars script (in contrib) fails
when hitting a pax extended header.

Make sure we always read the extended attributes from the pax entries,
and store the 'path' value if found to be used in the next ustar entry.

The code to parse pax extended headers was written consulting the Pax
Pax Interchange Format documentation [2].

[1] http://ftp.gnu.org/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.xz
[2] https://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+8-current&query=tar&sektion=5

Signed-off-by: Pedro Alvarez <palvarez89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/fast-import/import-tars.perl