[PATCH] import-tars: properly import git-archive tarballs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



git-archive adds a special entry to the archives it creates,
pax_global_header, containing the SHA1 of the exported commit.

import-tars.perl extracted it as a file, the top directory of
the archive became a subdirectory, and files moved with every
imported tarball.

Now import-tars correctly ignores the comment.

Signed-off-by: Gabriel <g2p.code@xxxxxxxxx>
---
 contrib/fast-import/import-tars.perl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/contrib/fast-import/import-tars.perl b/contrib/fast-import/import-tars.perl
index 95438e1..a5170a1 100755
--- a/contrib/fast-import/import-tars.perl
+++ b/contrib/fast-import/import-tars.perl
@@ -108,6 +108,7 @@ foreach my $tar_file (@ARGV)
 			}
 		}
 		print FI "\n";
+		next if $typeflag eq 'g' && $name eq 'pax_global_header';
 
 		my $path;
 		if ($prefix) {
-- 
1.7.0.rc2.31.g618d1

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]