Subject: [StGit PATCH 11/17] Emacs mode: add stgit-repair

From: David Kågedal <[email-masked]>
Date: Fri, 14 Dec 2007 11:58:39 +0100

Signed-off-by: David Kågedal <[email-masked]>
---

 contrib/stgit.el |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/contrib/stgit.el b/contrib/stgit.el
index 2d18061..20cb08f 100644
--- a/contrib/stgit.el
+++ b/contrib/stgit.el
@@ -89,6 +89,7 @@ Argument DIR is the repository path."
   (define-key stgit-mode-map "n"   'next-line)
   (define-key stgit-mode-map "g"   'stgit-refresh)
   (define-key stgit-mode-map "r"   'stgit-rename)
+  (define-key stgit-mode-map "\C-r"   'stgit-repair)
   (define-key stgit-mode-map ">"   'stgit-push-next)
   (define-key stgit-mode-map "<"   'stgit-pop-next)
   (define-key stgit-mode-map "P"   'stgit-push-or-pop)
@@ -138,6 +139,13 @@ Commands:
     (stgit-refresh)
     (stgit-goto-patch name)))
 
+(defun stgit-repair ()
+  "Run stg repair"
+  (interactive)
+  (stgit-capture-output nil
+   (stgit-run "repair"))
+  (stgit-refresh))
+
 (defun stgit-push-next ()
   "Push the first unapplied patch"
   (interactive)