Thread (5 messages) flat view 5 messages, 3 authors, 2021-08-20

Re: git format-patch produces invalid patch if the commit adds an empty file?

From: Junio C Hamano <hidden>
Date: 2021-08-20 21:09:52

Gwyneth Morgan [off-list ref] writes:
GNU patch chokes in this case with an unquoted filename with spaces.
When we settled what bytes (not characters) in a pathname will cause
it to be quoted and how the quoting is done between us and GNU diff
and patch maintainer back in Oct 2005, I thought that we excluded
whitespace from the bytes that need quoting [*].  And I do not
recall us changing the rule for pathname quoting since then (other
than introduction of core.quotepath to disable quoting bytes with
the 8th bit set).

It may be a "recent" change on the GNU patch side, and I do not
think we mind tweaking our diff output to be more accomodating iff
that observation is true.  I however understand that spaces in
pathnames are not so uncommon especially among non-programmers and
they may feel irritating having to see any pathname with spaces
quoted.


[Reference]

* https://lore.kernel.org/git/Pine.LNX.4.64.0510111121030.14597@g5.osdl.org/ (local)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help