Re: [PATCH] import-tars: properly import git-archive tarballs
- From
- Gabriel <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.