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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> 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.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux