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

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

 



> 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.

> > 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.
--
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]