From: Gwyneth Morgan <gwymor@tilde.club>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 0/2] (experimental) diff --quote-path-with-sp
Date: Thu, 16 Sep 2021 03:33:26 +0000 [thread overview]
Message-ID: <YUK7Bl9uzNE1YErg@tilde.club> (raw)
In-Reply-To: <20210915223316.1653443-1-gitster@pobox.com>
On 2021-09-15 15:33:14-0700, Junio C Hamano wrote:
> Long time ago, we had a discussion with GNU patch/diff maintainer
> and agreed that pathnames with certain "difficult" bytes needs to be
> quoted to ensure the resulting patch is machine parseable in an
> unambiguous way [*1*]. Recently, we saw a report that found that
> GNU patch is unhappy with our diff output for a path with SP in it
> [*2*].
>
> With this experimental option, the beginning part of the patch
> output will have pathnames with SP in them enclosed inside a pair of
> double quotes, like so:
>
> diff --git "a/A Name" "b/A Name"
> --- "a/A Name"
> +++ "b/A Name"
I believe GNU patch is fine with unquoted spaces in the "--- a/path"
and "+++ b/path", and only has an issue with unquoted spaces in the
"diff --git" line. busybox patch does seem to have an issue with quoted
filenames in the "---" and "+++" lines but is fine if those lines are
unquoted. Maybe we could leave spaces unquoted in those lines, only
quoted if there's some other character that needs it.
next prev parent reply other threads:[~2021-09-16 3:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-15 22:33 [PATCH 0/2] (experimental) diff --quote-path-with-sp Junio C Hamano
2021-09-15 22:33 ` [PATCH 1/2] diff: simplify quote_two() Junio C Hamano
2021-09-15 22:33 ` [PATCH 2/2] diff: --quote-path-with-sp Junio C Hamano
2021-09-16 9:06 ` Ævar Arnfjörð Bjarmason
2021-09-16 20:59 ` Junio C Hamano
2021-09-16 3:33 ` Gwyneth Morgan [this message]
2021-09-16 5:31 ` [PATCH 0/2] (experimental) diff --quote-path-with-sp 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YUK7Bl9uzNE1YErg@tilde.club \
--to=gwymor@tilde.club \
--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).