From b0baeeb6b61132af92fd75df5f912554d295dee1 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Fri, 25 Mar 2011 18:48:49 +0100 Subject: diff, refresh: Accept file names with spaces This is a continuation of Yasushi SHOJI's initial work of fixing support for file names with spaces. This time I fixed support in the diff and refresh commands, two commands which are frequently used. As before, no guarantee is made that all options are covered, but this should be a good starting point. Signed-off-by: Jean Delvare --- test/space-in-filenames.test | 52 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'test') diff --git a/test/space-in-filenames.test b/test/space-in-filenames.test index 335877a..eb0d035 100644 --- a/test/space-in-filenames.test +++ b/test/space-in-filenames.test @@ -10,6 +10,7 @@ $ quilt add foo $ quilt files > foo +$ echo foo > "foo bar" $ quilt add "foo bar" > File foo bar added to patch patches/test.diff @@ -25,6 +26,57 @@ $ quilt files > foo > foo bar +$ echo bar > "foo bar" +$ echo "new line" > "a: b [c]" +$ quilt diff -p ab +> Index: b/a: b [c] +> =================================================================== +> --- /dev/null +> +++ b/a: b [c] +> @@ -0,0 +1 @@ +> +new line +> Index: b/foo bar +> =================================================================== +> --- a/foo bar +> +++ b/foo bar +> @@ -1 +1 @@ +> -foo +> +bar + +$ quilt refresh -p ab +> Refreshed patch patches/test.diff +$ cat patches/test.diff +> Index: b/a: b [c] +> =================================================================== +> --- /dev/null +> +++ b/a: b [c] +> @@ -0,0 +1 @@ +> +new line +> Index: b/foo bar +> =================================================================== +> --- a/foo bar +> +++ b/foo bar +> @@ -1 +1 @@ +> -foo +> +bar + +$ quilt refresh -p ab --sort +> Patch patches/test.diff is unchanged +$ cat patches/test.diff +> Index: b/a: b [c] +> =================================================================== +> --- /dev/null +> +++ b/a: b [c] +> @@ -0,0 +1 @@ +> +new line +> Index: b/foo bar +> =================================================================== +> --- a/foo bar +> +++ b/foo bar +> @@ -1 +1 @@ +> -foo +> +bar + $quilt remove "a: b [c]" > File a: b [c] removed from patch patches/test.diff -- cgit