Thread (7 messages) flat view 7 messages, 5 authors, 2016-06-15

Re: [PATCH] diff-raw format update take #2.

From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:41:58


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.

And here '-z' doesn't help us, because we're basically screwed by the diff 
format (not our own decision).

So CVS uses "Index: " to help this somewhat, and we can get it right for
renames and copies (because we then output the name in a way that is at
least space and tab-safe, if not newline-safe). But basically, anything
that uses patches as a medium for passing information around should
_really_ avoid using spaces or tabs in filenames, and that's quite
independent of git ;/

		Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help