stgit.el: Fix showing diff in file that has been both copied and modified
authorGustav Hållberg <gustav@gmail.com>
Wed, 12 May 2010 18:14:12 +0000 (20:14 +0200)
committerGustav Hållberg <gustav@gmail.com>
Thu, 27 May 2010 12:26:36 +0000 (14:26 +0200)
Use --diff-filter=C when showing the diff of the copy operation.

Signed-off-by: Gustav Hållberg <gustav@gmail.com>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
contrib/stgit.el

index 1bc78a2..564714b 100644 (file)
@@ -2016,6 +2016,8 @@ which stage to diff against in the case of unmerged files."
                                      (list unmerged-stage))
                                     (t
                                      (list (concat patch-id "^") patch-id)))
+                              (and (eq (stgit-file->status patched-file) 'copy)
+                                   '("--diff-filter=C"))
                               '("--")
                               (if (stgit-file->copy-or-rename patched-file)
                                   (list (stgit-file->cr-from patched-file)