stgit.el: Repair how patches with empty descriptions are shown
authorGustav Hållberg <gustav@virtutech.com>
Sun, 6 Dec 2009 19:30:43 +0000 (20:30 +0100)
committerGustav Hållberg <gustav@virtutech.com>
Sun, 6 Dec 2009 19:30:43 +0000 (20:30 +0100)
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
contrib/stgit.el

index 3ebeb72..f4b3aa7 100644 (file)
@@ -291,8 +291,10 @@ A newline is appended."
                 ?e (if (stgit-patch->empty patch) "(empty) " "")
                 ?d (propertize (or (stgit-patch->desc patch) "")
                                'face 'stgit-description-face)
-                ?D (propertize (or (stgit-patch->desc patch)
-                                   (stgit-patch-display-name patch))
+                ?D (propertize (let ((desc (stgit-patch->desc patch)))
+                                 (if (zerop (length desc))
+                                   (stgit-patch-display-name patch)
+                                   desc))
                                'face face)))
          (text (format-spec fmt spec)))