Re: [PATCH 2/2] diff: --quote-path-with-sp
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 16, 2021, 20:59 UTC
- Message-ID
- <xmqq35q4texo.fsf@gitster.g>
- In-Reply-To
- <87ee9ohnqd.fsf@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 17 quoted lines
> On Wed, Sep 15 2021, Junio C Hamano wrote: > > [CC-ing Andreas Gruenbacher who's currently active in GNU patch > development, and Paul Eggert at his current address, in case he's > curious about this blast from the past. > > Both: The full context for this proposed change in Git is at > https://lore.kernel.org/git/20210915223316.1653443-1-gitster@pobox.com/] > >> 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*]. > > It would also be good to mention 4f6fbcdcf96 ...
Ah, I didn't mean "this is the single message to understand the issue". The reference was meant as "you need to read the discussion that starts around here", which you apparently did ;-)
There is another message that is much more relevant that does not appear in the thread (and I do not know its message ID), where Linus came up with a way to parse the "diff --git a/... b/..." line, or the first "--- a/..." and "+++ b/..." lines, and learn the pathnames on the preimage side and on the postimage side unambiguously. I think that discovery led to the current implementation.