Show correct filenames in the "Pending changes" section.

* magit.el (magit-diff-line-file): Don't insist on "a/..." being the
first file.
This commit is contained in:
Marius Vollmer 2009-02-28 19:22:22 +02:00
parent 8652dc979c
commit 5a1039cd6f

View file

@ -1384,7 +1384,7 @@ Please see the manual for a complete description of Magit.
(magit-refresh))
(defun magit-diff-line-file ()
(cond ((looking-at "^diff --git a/\\(.*\\) b/\\(.*\\)$")
(cond ((looking-at "^diff --git ./\\(.*\\) ./\\(.*\\)$")
(match-string-no-properties 2))
((looking-at "^diff --cc +\\(.*\\)$")
(match-string-no-properties 1))