git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
GGabriel <g2p.code@gmail.com>
Date
Feb 17, 2010, 19:20 UTC
Message-ID
<1266434452-14532-1-git-send-email-g2p.code@gmail.com>

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
Next: Peter Krefting
Message 1 of 6 in “import-tars: properly import git-archive tarballs”
  1. import-tars: properly import git-archive tarballsGabriel, Feb 17, 2010
  2. Peter KreftingFeb 18, 2010
  3. GabrielFeb 18, 2010
  4. import-tars: Make it possible to include the original commit IDPeter Krefting, Feb 18, 2010
  5. import-tars: Make it possible to include the original commit IDGabriel, Feb 18, 2010
  6. Peter KreftingFeb 19, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.