Thread (1 message) 1 message, 1 author, 2024-03-27

Re: [PATCH 0/1] quote: quote space

From: Junio C Hamano <hidden>
Date: 2024-03-27 14:59:21

Jeff King [off-list ref] writes:
I think it may be OK because true absolute paths imply that the first
entry would start with "/", and we would already have bailed earlier in
the function. So:

  diff --git /foo /bar

will already be rejected at the start of "/foo". And in broken input
like:

  diff --git a/foo /bar

we must assume that the start of "/bar" is a possible name, which is
what your patch is fixing. And in broken mixed input like that, we would
fail to find a valid split point, and correctly return NULL.
Correct.
I guess these happen in practice with "/dev/null" as the left-hand side.
But there we'd never need the names from this line, since we'd have a
separate "deleted file mode ..." header line.
Correct.  Besides, /dev/null appears on the ---/+++ line but not on
the "diff --git" line that is being parsed here.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help