From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gabriel Subject: Re: [PATCH] import-tars: properly import git-archive tarballs Date: Thu, 18 Feb 2010 14:00:02 +0100 Message-ID: <20100218140002.14f79853@gmail.com> References: <1266434452-14532-1-git-send-email-g2p.code@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Peter Krefting To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Thu Feb 18 14:00:26 2010 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ni5zV-0004ov-Ql for gcvg-git-2@lo.gmane.org; Thu, 18 Feb 2010 14:00:26 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751440Ab0BRNAT convert rfc822-to-quoted-printable (ORCPT ); Thu, 18 Feb 2010 08:00:19 -0500 Received: from smtp3-g21.free.fr ([212.27.42.3]:43387 "EHLO smtp3-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751243Ab0BRNAS convert rfc822-to-8bit (ORCPT ); Thu, 18 Feb 2010 08:00:18 -0500 Received: from smtp3-g21.free.fr (localhost [127.0.0.1]) by smtp3-g21.free.fr (Postfix) with ESMTP id 2866881808F; Thu, 18 Feb 2010 14:00:10 +0100 (CET) Received: from localhost (pro75-5-88-162-203-35.fbx.proxad.net [88.162.203.35]) by smtp3-g21.free.fr (Postfix) with ESMTP id 1ED6181818E; Thu, 18 Feb 2010 14:00:08 +0100 (CET) In-Reply-To: <1266434452-14532-1-git-send-email-g2p.code@gmail.com> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.18.3; x86_64-pc-linux-gnu) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: > Gabriel: > > git-archive adds a special entry to the archives it creates,=20 > > pax_global_header, containing the SHA1 of the exported commit. >=20 > Interesting use-case. My use case really was a simple =E2=80=9Cimport a range of tarballs for bisecting=E2=80=9D. 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. >=20 > 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.