summaryrefslogtreecommitdiffstats
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/META-INF/services/org.eclipse.jgit.pgm.TextBuiltin1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Die.java13
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java11
3 files changed, 25 insertions, 0 deletions
diff --git a/org.eclipse.jgit.pgm/src/META-INF/services/org.eclipse.jgit.pgm.TextBuiltin b/org.eclipse.jgit.pgm/src/META-INF/services/org.eclipse.jgit.pgm.TextBuiltin
index 9c8933f5d1..6c2a653066 100644
--- a/org.eclipse.jgit.pgm/src/META-INF/services/org.eclipse.jgit.pgm.TextBuiltin
+++ b/org.eclipse.jgit.pgm/src/META-INF/services/org.eclipse.jgit.pgm.TextBuiltin
@@ -1,3 +1,4 @@
+org.eclipse.jgit.pgm.AmazonS3Client
org.eclipse.jgit.pgm.Branch
org.eclipse.jgit.pgm.Clone
org.eclipse.jgit.pgm.Daemon
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Die.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Die.java
index e514ca5147..a2f4060821 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Die.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Die.java
@@ -1,4 +1,5 @@
/*
+ * Copyright (C) 2009, Google Inc.
* Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
* and other copyright owners as documented in the project's IP log.
*
@@ -62,4 +63,16 @@ public class Die extends RuntimeException {
public Die(final String why) {
super(why);
}
+
+ /**
+ * Construct a new message explaining what has gone wrong.
+ *
+ * @param why
+ * the message to show to the end-user.
+ * @param cause
+ * why the command has failed.
+ */
+ public Die(final String why, final Throwable cause) {
+ super(why, cause);
+ }
}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
index edd4fbcf9b..13b45e242a 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
@@ -229,6 +229,17 @@ public abstract class TextBuiltin {
return new Die(why);
}
+ /**
+ * @param why
+ * textual explanation
+ * @param cause
+ * why the command has failed.
+ * @return a runtime exception the caller is expected to throw
+ */
+ protected static Die die(final String why, final Throwable cause) {
+ return new Die(why, cause);
+ }
+
String abbreviateRef(String dst, boolean abbreviateRemote) {
if (dst.startsWith(R_HEADS))
dst = dst.substring(R_HEADS.length());