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