aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Hållberg <gustav@gmail.com>2012-04-06 21:32:33 +0200
committerGustav Hållberg <gustav@gmail.com>2012-04-09 09:23:20 +0200
commit059f8e03b8870ed3732b9b90d9fda532e59a8435 (patch)
treed4b5b301a944df5ee06c53baccc237c79866bbf5
parentffeee13eb963c5cf677660406d68404fbebddaf8 (diff)
downloadstgit-059f8e03b8870ed3732b9b90d9fda532e59a8435.tar.gz
stgit.el: Catch errors in a better way in stgit-init
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
-rw-r--r--contrib/stgit.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/stgit.el b/contrib/stgit.el
index 929376c..03eb74a 100644
--- a/contrib/stgit.el
+++ b/contrib/stgit.el
@@ -1804,11 +1804,12 @@ line of PATCHSYM and return :patch."
result))
(defun stgit-init ()
- "Run stg init."
+ "Run stg init to initialize the current branch for use with StGit."
(interactive)
(stgit-assert-mode)
- (stgit-capture-output nil
- (stgit-run "init"))
+ (unless (zerop (stgit-capture-output nil
+ (stgit-run "init")))
+ (error "stg init failed"))
(stgit-reload))
(defun stgit-toggle-mark ()