aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
index be8ad374d3..faa0f51d76 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
@@ -53,6 +53,7 @@ import java.util.List;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.PushCommand;
+import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.ObjectReader;
@@ -115,7 +116,7 @@ class Push extends TextBuiltin {
/** {@inheritDoc} */
@Override
- protected void run() throws Exception {
+ protected void run() {
try (Git git = new Git(db)) {
PushCommand push = git.push();
push.setDryRun(dryRun);
@@ -140,6 +141,8 @@ class Push extends TextBuiltin {
printPushResult(reader, result.getURI(), result);
}
}
+ } catch (GitAPIException | IOException e) {
+ throw die(e.getMessage(), e);
}
}