(erase-buffer)
(insert "Branch: ")
(stgit-run-silent "branch")
- (stgit-run-silent "series" "--description")
+ (stgit-run-silent "series" "--description" "--empty")
(stgit-rescan)
(if curpatch
(stgit-goto-patch curpatch)
(cond ((looking-at "Branch: \\(.*\\)")
(put-text-property (match-beginning 1) (match-end 1)
'face 'bold))
- ((looking-at "\\([>+-]\\)\\( \\)\\([^ ]+\\) *[|#] \\(.*\\)")
+ ((looking-at "\\([0 ]\\)\\([>+-]\\)\\( \\)\\([^ ]+\\) *[|#] \\(.*\\)")
(setq found-any t)
- (let ((state (match-string 1))
- (patchsym (intern (match-string 3))))
+ (let ((empty (match-string 1))
+ (state (match-string 2))
+ (patchsym (intern (match-string 4))))
(put-text-property
- (match-beginning 3) (match-end 3) 'face
+ (match-beginning 4) (match-end 4) 'face
(cond ((string= state ">") 'stgit-top-patch-face)
((string= state "+") 'stgit-applied-patch-face)
((string= state "-") 'stgit-unapplied-patch-face)))
- (put-text-property (match-beginning 4) (match-end 4)
+ (put-text-property (match-beginning 5) (match-end 5)
'face 'stgit-description-face)
(when (memq patchsym stgit-marked-patches)
- (replace-match "*" nil nil nil 2)
+ (save-excursion
+ (replace-match "*" nil nil nil 3))
(setq marked (cons patchsym marked)))
(put-text-property (match-beginning 0) (match-end 0)
'stgit-patchsym patchsym)
(when (memq patchsym stgit-expanded-patches)
(stgit-expand-patch patchsym))
+ (when (equal "0" empty)
+ (save-excursion
+ (goto-char (match-beginning 5))
+ (insert "(empty) ")))
+ (delete-char 1)
))
((or (looking-at "stg series: Branch \".*\" not initialised")
(looking-at "stg series: .*: branch not initialized"))