From: Junio C Hamano <gitster@pobox.com>
To: Bagas Sanjaya <bagasdotme@gmail.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH 2/2] git-format-patch: Document format for binary patch
Date: Thu, 25 Mar 2021 11:25:48 -0700 [thread overview]
Message-ID: <xmqqft0jw0nn.fsf@gitster.g> (raw)
In-Reply-To: <678c0fa9-8ae5-f8ae-b93a-3d68c7c11c8f@gmail.com> (Bagas Sanjaya's message of "Thu, 25 Mar 2021 13:22:37 +0700")
Bagas Sanjaya <bagasdotme@gmail.com> writes:
> On 25/03/21 00.53, Junio C Hamano wrote:
>> I do not think this is all that useful; it clutters the description
>> for a reader who is not interested in reimplementing an encoder or a
>> decoder from the document.
>> And it is way too insufficient for a reader who wants to reimplement
>> an encoder or a decoder. For example,
>> - It does not say anything about what the delta is and how it is
>> computed.
>> - The 'z' is redundant; the more important is to say that the
>> first
>> byte signals how many bytes are on that line and it is a mere
>> artifact that we cram up to 52 bytes on a line.
>> - It does not say anything about how the binary patch ensures that
>> it is reversible (i.e. can be given to "git apply -R").
>> Thanks.
>>
> Hmmm...
>
> I write this patch from "naive" observation of git format-patch's
> behavior when given binary files in the commit.
>
> Perhaps someone which is more familiar in base85 {en,de}coder and binary
> patch in general can write better documentation than what I send here.
I do not mind reviewing an update to an existing document or a new
document in Documentation/technical/ somewhere, if somebody is
motivated enough to write the details to a degree that would allow
reimplementation of the encoder and the decoder. I just do not think
it belongs to the end-user-facing document of "format-patch", whose
target is users of the "format-patch" command, not reimplementors of
the command.
prev parent reply other threads:[~2021-03-25 18:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-24 12:30 [PATCH 0/2] Diff format documentation for git-format-patch Bagas Sanjaya
2021-03-24 12:30 ` [PATCH 1/2] git-format-patch: Include diff-generate-patch documentation Bagas Sanjaya
2021-03-24 17:40 ` Junio C Hamano
2021-03-24 12:30 ` [PATCH 2/2] git-format-patch: Document format for binary patch Bagas Sanjaya
2021-03-24 17:53 ` Junio C Hamano
2021-03-25 6:22 ` Bagas Sanjaya
2021-03-25 18:25 ` Junio C Hamano [this message]
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=xmqqft0jw0nn.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=bagasdotme@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.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).