git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] import-tars: properly import git-archive tarballs
@ 2010-02-17 19:20 Gabriel
  2010-02-18  9:40 ` Peter Krefting
  2010-02-18 13:00 ` Gabriel
  0 siblings, 2 replies; 6+ messages in thread
From: Gabriel @ 2010-02-17 19:20 UTC (permalink / raw)
  To: git; +Cc: Gabriel

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@gmail.com>
---
 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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-02-19  8:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-17 19:20 [PATCH] import-tars: properly import git-archive tarballs Gabriel
2010-02-18  9:40 ` Peter Krefting
2010-02-18 13:00 ` Gabriel
2010-02-18 13:24   ` [PATCH] import-tars: Make it possible to include the original commit ID Peter Krefting
2010-02-18 15:02     ` Gabriel
2010-02-19  8:12       ` Peter Krefting

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).