git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] import-tars: ignore the global PAX header

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 23, 2020, 21:50 UTC
Message-ID
<xmqqtv2e3fmu.fsf@gitster.c.googlers.com>
In-Reply-To
<nycvar.QRO.7.76.6.2003232205580.46@tvgsbejvaqbjf.bet>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 8 quoted lines
>> throws too much.  That would welcome their effort to enhance the
>> importer, if they find it more useful to keep some other information
>> found in global headers, without breaking the intent of this change.
>
> I don't think that we're throwing away anything because the PAX header is
> intended to be a _header_, not a _file_, yet
> `contrib/fast-import/import-tars.perl` currently treats PAX headers that
> way.

What I meant (and wrote) was information contained within the header. You could store such metadata (e.g. this tree came from this commit from the upstream project) in the commit object while importing, for example.

As I wrote, I do not think we need to implement such feature right now. I am just saying that we should make sure we are not unintendely discouraging future developers from doing so by giving an impression that we are claiming "a pax header is intended to be a header and has no interesting information---never look at it". If we said "We discard the headers because it is the most expedient way and we currently have no use for them", that would make it clear that it is OK for them (the future ourselves developers) to extend the code not to lose the information, as long as they keep ignoring the prefix thing alone, if they want to follow the course set by this change.

Show 10 quoted lines
>> Having said all that, even before "git archive" existed, release
>> tarballs by many projects had leading prefix so that a tarball
>> extract would be made inside a versioned directory.  To truly help
>> users of the importer, doesn't the logic to allow the user to say
>> "please strip one leading level of directory from all the tarballs I
>> feed you, as I know they are versioned directories" belong to the
>> command line option of the importer?
>
> I guess nobody needed an explicit way to strip path prefixes yet, since
> the implicit way works so well.

Now you confused me. If implicit way already works well, why are we adding this patch to make it implicitly ignore?

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 5 of 13 in “import-tars: ignore the global PAX header”
  1. import-tars: ignore the global PAX headerJohannes Schindelin via GitGitGadget, Mar 23, 2020
  2. René ScharfeMar 23, 2020
  3. Junio C HamanoMar 23, 2020
  4. Johannes SchindelinMar 23, 2020
  5. Junio C HamanoMar 23, 2020
  6. Johannes SchindelinMar 23, 2020
  7. Junio C HamanoMar 23, 2020
  8. brian m. carlsonMar 23, 2020
  9. Johannes SchindelinMar 24, 2020
  10. import-tars: ignore the global PAX headerJohannes Schindelin via GitGitGadget, Mar 24, 2020
  11. Junio C HamanoMar 24, 2020
  12. Johannes SchindelinMar 25, 2020
  13. Junio C HamanoMar 25, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.