From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 8791D1F45D for ; Tue, 24 Mar 2020 21:04:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727088AbgCXVE0 (ORCPT ); Tue, 24 Mar 2020 17:04:26 -0400 Received: from pb-smtp1.pobox.com ([64.147.108.70]:53374 "EHLO pb-smtp1.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726673AbgCXVE0 (ORCPT ); Tue, 24 Mar 2020 17:04:26 -0400 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 0A4285ABEC; Tue, 24 Mar 2020 17:04:25 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=UcFpqc7rLH3RL6QWJeo0saOLF6w=; b=B1EA9c m+u1A65DmrqJvBEC+BJqZTpkACc/JnzOPzXAjZLO8uqMie0dsDOiVYXIyRPUx9Hm sqEm54Yc33+n2ZURrem/j+2Y5o+CXwEq40EVB964uhFSCvVH/4+wDPt/a4CezfS+ ikuW+j+bNO8qsgspNuM5yD1Y6KnDYetnDuPZA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=yGVD2Qu7uYMwkPqN8Ge3vYvKCAs0zbkY SyKDjGwoqzb9JXJY/WaWg3Y1uGX71g25Ary0HKtKS3S0JHNVIkWBQUr7sqprmLZ4 MAucMiKadebvgZulkFvPSkCfB8EyTsRxdY8DItRXHtwdV4pITrZMh+PGbC6vwP+z CW8mWhr7caA= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 0180F5ABEB; Tue, 24 Mar 2020 17:04:25 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.74.119.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 762E85ABEA; Tue, 24 Mar 2020 17:04:24 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: "Johannes Schindelin via GitGitGadget" Cc: git@vger.kernel.org, =?utf-8?Q?Ren=C3=A9?= Scharfe , "brian m. carlson" , Johannes Schindelin Subject: Re: [PATCH v2] import-tars: ignore the global PAX header References: Date: Tue, 24 Mar 2020 14:04:24 -0700 In-Reply-To: (Johannes Schindelin via GitGitGadget's message of "Tue, 24 Mar 2020 19:35:45 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 0A553620-6E13-11EA-8197-C28CBED8090B-77302942!pb-smtp1.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org "Johannes Schindelin via GitGitGadget" writes: > + Note: this global header might contain useful information. For example, > + in the output of `git archive`, it lists the original commit, which _is_ > + useful information. A future improvement to the `import-tars.perl` > + script might be to include that information in the commit message, or do > + other things with the information (e.g. use `mtime` information > + contained in the global header as date of the commit). This patch does > + not prevent any future patch from making that happen, it only prevents > + the header from being treated as if it was a regular file. > > Signed-off-by: Johannes Schindelin > > > > contrib/fast-import/import-tars.perl | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/contrib/fast-import/import-tars.perl b/contrib/fast-import/import-tars.perl > index e800d9f5c9c..d50ce26d5d9 100755 > --- a/contrib/fast-import/import-tars.perl > +++ b/contrib/fast-import/import-tars.perl > @@ -139,6 +139,8 @@ > print FI "\n"; > } > > + next if ($typeflag eq 'g'); # ignore global header > + Yeah, it is more like "don't create a phony file out of global header" which is exactly the point of this fix, rather than "ignore global header", and if the contents of the header is used for any other purpose (e.g. metadata that will be added to the log message or mode bits that is forced on all files), that can be handled before this line. And the current code structure is already prepared for it: all that remains in the block after this point is to create a file at $path and store its contents. So, this makes sense. I suspect that with an update to the comment in the direction, there probably is no need for the huge "Note" in the log message. Thanks. > my $path; > if ($prefix) { > $path = "$prefix/$name"; > > base-commit: b4374e96c84ed9394fed363973eb540da308ed4f