From: Junio C Hamano <gitster@pobox.com>
To: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, "René Scharfe" <l.s.r@web.de>,
"brian m. carlson" <sandals@crustytoothpaste.net>,
"Johannes Schindelin" <johannes.schindelin@gmx.de>
Subject: Re: [PATCH v2] import-tars: ignore the global PAX header
Date: Tue, 24 Mar 2020 14:04:24 -0700 [thread overview]
Message-ID: <xmqqd0911n3b.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <pull.577.v2.git.1585078545448.gitgitgadget@gmail.com> (Johannes Schindelin via GitGitGadget's message of "Tue, 24 Mar 2020 19:35:45 +0000")
"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
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 <johannes.schindelin@gmx.de>
>
>
>
> 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
next prev parent reply other threads:[~2020-03-24 21:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-23 13:08 [PATCH] import-tars: ignore the global PAX header Johannes Schindelin via GitGitGadget
2020-03-23 17:09 ` René Scharfe
2020-03-23 17:41 ` Junio C Hamano
2020-03-23 21:08 ` Johannes Schindelin
2020-03-23 21:50 ` Junio C Hamano
2020-03-23 21:05 ` Johannes Schindelin
2020-03-23 21:53 ` Junio C Hamano
2020-03-23 23:25 ` brian m. carlson
2020-03-24 13:35 ` Johannes Schindelin
2020-03-24 19:35 ` [PATCH v2] " Johannes Schindelin via GitGitGadget
2020-03-24 21:04 ` Junio C Hamano [this message]
2020-03-25 17:59 ` Johannes Schindelin
2020-03-25 18:43 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqd0911n3b.fsf@gitster.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=johannes.schindelin@gmx.de \
--cc=l.s.r@web.de \
--cc=sandals@crustytoothpaste.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).