diff tests/test-git-import @ 4679:826659bd8053

git patches: correct handling of filenames with spaces Add a trailing TAB to the "--- filename" lines if there's a space in the file name. This allows patch(1) to work correctly. The same is done for diff --nodates. This was originally suggested by Andrei Vermel, but at the time I thought git was doing something different.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Fri, 22 Jun 2007 19:06:04 -0300
parents ad3d5b4367cb
children 4cd52978e188
line wrap: on
line diff
--- a/tests/test-git-import	Fri Jun 22 14:32:54 2007 -0300
+++ b/tests/test-git-import	Fri Jun 22 19:06:04 2007 -0300
@@ -181,3 +181,16 @@
 
 EOF
 hg manifest --debug | grep mbinary
+
+echo % filenames with spaces
+hg import -m spaces - <<EOF
+diff --git a/foo bar b/foo bar
+new file mode 100644
+index 0000000..257cc56
+--- /dev/null
++++ b/foo bar	
+@@ -0,0 +1 @@
++foo
+EOF
+cat "foo bar"
+