Re: [PATCH] diff-raw format update take #2.
On Mon, 23 May 2005, Linus Torvalds wrote:
Show 13 quoted lines
> On Mon, 23 May 2005, Junio C Hamano wrote:
>>
>> Embedded spaces in path is _always_ safe.
>
> For raw-diff yes, but since you'd normally end up using that name in the
> diff, it won't be safe any more.
>
> Imagine a name like "this is a file", and think about how the diff ends up
> looking:
>
> diff --git a/this is a file b/this is a file
>
> and realize that that can't be parsed sanely by anybody who uses the diff.
hmm, personally I would have expected it to do shell escapeing of the name
diff --git a/this\ is\ a \ file b/this\ is\ a\ file
given that diff is trying to record how it was called.
David Lang
--
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
-- C.A.R. Hoare