From: Christoph Anton Mitterer <calestyo@scientia.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: git format-patch escaping issues in the patch format
Date: Tue, 05 Nov 2024 02:01:16 +0100 [thread overview]
Message-ID: <b856a94969b7065e84dce60d35ae3ce72b5d0f91.camel@scientia.org> (raw)
In-Reply-To: <xmqqttcmv8a6.fsf@gitster.g>
Hey.
On Mon, 2024-11-04 at 16:22 -0800, Junio C Hamano wrote:
> ... this falls squarely into "if it hurts, don't do it" category.
I rather thought it would be the category "if it's a bug, that is
completely non-obvious and not really to expect, with not even a
warning in place,... it should better be fixed" ;-)
There is not reason for any commit author to assume that these strings
are not valid, or possibly cause later breakage.
Even if so, it seems not really feasible to know any possible strings,
especially when people might just copy&paste output from others into
their commit message.
To the least there should be an error when format-patch creates a one
that cannot be parsed afterwards.
And a proper solution would employ some form of escaping.
And if one's on the other side, and wants to write a parser, one has no
real chance of assuring that only "valid" input is used by users in a
commit message.
One can easily imagine hat this could accidentally (or intentionally)
be used apply undesired patches.
Cheers,
Chris.
prev parent reply other threads:[~2024-11-05 4:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-04 19:24 git format-patch escaping issues in the patch format Christoph Anton Mitterer
2024-11-04 22:15 ` Kristoffer Haugsbakk
2024-11-05 1:26 ` Christoph Anton Mitterer
2024-11-05 14:32 ` Kristoffer Haugsbakk
2024-11-05 15:02 ` Christoph Anton Mitterer
2024-11-04 23:54 ` Jeff King
2024-11-05 1:03 ` Christoph Anton Mitterer
2024-11-05 15:05 ` Jeff King
2024-11-05 0:22 ` Junio C Hamano
2024-11-05 1:01 ` Christoph Anton Mitterer [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b856a94969b7065e84dce60d35ae3ce72b5d0f91.camel@scientia.org \
--to=calestyo@scientia.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).