From: Junio C Hamano <gitster@pobox.com>
To: "René Scharfe" <l.s.r@web.de>
Cc: Matt Turner <mattst88@gmail.com>,
git@vger.kernel.org,
David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Subject: Re: [PATCH] archive: Store checksum correctly
Date: Tue, 23 Jul 2019 14:21:12 -0700 [thread overview]
Message-ID: <xmqqef2gsb07.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <14410e00-4701-40d0-6960-e481fea50ed0@web.de> ("René Scharfe"'s message of "Tue, 23 Jul 2019 21:38:47 +0200")
René Scharfe <l.s.r@web.de> writes:
>> Wow. The choice of %07o is as old as the very original of tar-tree
>> implementation in our codebase, starting at ae64bbc1 ("tar-tree:
>> Introduce write_entry()", 2006-03-25).
>
> Actually it's already in 731ab9ccf2 ("[PATCH] create tar archives of
> tree on the fly", 2005-04-28).
Yup, after viewing "git show ae64bbc1" I found out the commit added
a new helper to do %07o without touching the existing one that did
the same. Problem with relying on "git blame" too much X-<.
>> I think the updated behaviour matches Wikipedia [*1*] where it
>> spells out that 6 octal is followed by a NUL and a SP; it also says
>> various implementations do not adhere to this format---perhaps they
>> meant us ;-)
>
> OpenBSD's pax(1) does the same if I read
> https://github.com/openbsd/src/blob/master/bin/pax/tar.c correctly.
What's more interesting is that their verifier in tar_id() compares
the ulong value read from textual checksum with the ulong value
computed. I agree with you that it would be the more robust way
than what is done by squshfs tools (ng).
next prev parent reply other threads:[~2019-07-23 21:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-23 2:57 [PATCH] archive: Store checksum correctly Matt Turner
2019-07-23 16:49 ` Junio C Hamano
2019-07-23 19:31 ` Jeff King
2019-07-23 19:38 ` René Scharfe
2019-07-23 20:08 ` René Scharfe
2019-07-23 21:34 ` David Oberhollenzer
2019-07-23 21:21 ` Junio C Hamano [this message]
2019-07-24 1:04 ` Jonathan Nieder
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=xmqqef2gsb07.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=david.oberhollenzer@sigma-star.at \
--cc=git@vger.kernel.org \
--cc=l.s.r@web.de \
--cc=mattst88@gmail.com \
/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).