From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>,
git@vger.kernel.org, "René Scharfe" <l.s.r@web.de>,
"brian m. carlson" <sandals@crustytoothpaste.net>
Subject: Re: [PATCH v2] import-tars: ignore the global PAX header
Date: Wed, 25 Mar 2020 18:59:14 +0100 (CET) [thread overview]
Message-ID: <nycvar.QRO.7.76.6.2003251859070.46@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <xmqqd0911n3b.fsf@gitster.c.googlers.com>
Hi Junio,
On Tue, 24 Mar 2020, Junio C Hamano wrote:
> "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.
Too many of such in-code comments added by me became stale. I'd rather
keep this in the commit message where it explains the reasoning for the
current change.
Thanks,
Dscho
>
> Thanks.
>
> > my $path;
> > if ($prefix) {
> > $path = "$prefix/$name";
> >
> > base-commit: b4374e96c84ed9394fed363973eb540da308ed4f
>
next prev parent reply other threads:[~2020-03-25 18:00 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
2020-03-25 17:59 ` Johannes Schindelin [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=nycvar.QRO.7.76.6.2003251859070.46@tvgsbejvaqbjf.bet \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).