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

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

From
GGabriel <g2p.code@gmail.com>
Date
Feb 18, 2010, 13:00 UTC
Message-ID
<20100218140002.14f79853@gmail.com>
In-Reply-To
<1266434452-14532-1-git-send-email-g2p.code@gmail.com>
Show 5 quoted lines
> Gabriel:
> > git-archive adds a special entry to the archives it creates, 
> > pax_global_header, containing the SHA1 of the exported commit.
> 
> Interesting use-case.

My use case really was a simple “import a range of tarballs for bisecting”. That they were from git was a surprise, but I don't have access to that repo, which for all I know is full of junk and not meant for publication, so I'm not trying to get the original history.

I just want importing to work on tarballs found in the wild.
Show 5 quoted lines
> > Now import-tars correctly ignores the comment.
> 
> In the case where you actually would care, perhaps it should be added
> as a comment to the default commit message? Something like "Imported
> from $tar_file, created from commit $commit.".
Someone with stronger perl-fu to parse the hash comment could print on
stderr (keep me CC-ed if you do that):
  This tarball was generated by git, from commit id $SHA1.

It will serve as a hint when the person doing the import has access to the original history. I don't think there's a point in keeping a sha1 when there's no access; keeping it in the history would confuse people, or require sticking a longer explanation to each of these commits.

Previous: Peter KreftingNext: Peter Krefting
Message 3 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.