magit/magit — pull request #1398 by vanicat (2014-06-09 08:42:41+00:00)
Title: A fix for a quirks in git diff output

Once again I've a problem with some file with space in their name. Apparently, git diff some time add tab in the --- and +++ line, as shown in this interactive session:

$ git diff -M -C --no-prefix| sed 's/$/$/'
diff --git IUT/canditature/presentation-canditature.tex IUT/canditature/presentation-canditature.tex$
index a72e4e5..71d6c8b 100644$
--- IUT/canditature/presentation-canditature.tex$
+++ IUT/canditature/presentation-canditature.tex$
@@ -2,6 +2,7 @@$
\usetheme{Madrid}$
\usecolortheme{default}$
$
+$
\usepackage[french]{babel}$
\usepackage{tikz}$
\usetikzlibrary{shapes,arrows}$
diff --git IUT/programme pedagogique national.org IUT/programme pedagogique national.org$
index 7d67482..e336310 100644$
--- IUT/programme pedagogique national.org	$
+++ IUT/programme pedagogique national.org	$

So those tab need to be removed when they are present.

I also added tests on file with space in their name, to protect us from further problem with this.

By the way there is no rush, enjoy your holidays.