diff options
author | Mikael Karlsson <mmmicke@gmail.com> | 2012-05-18 22:07:50 +0200 |
---|---|---|
committer | Mikael Karlsson <mmmicke@gmail.com> | 2012-05-18 22:07:50 +0200 |
commit | 15147a273fc9085ca3cf459dec42f7a88b22ffbf (patch) | |
tree | 2f99ce04ebedec9452cc78ec52b49d4536a603c2 /org.eclipse.jgit.pgm | |
parent | 28d48b87ad41153ba3d53e75258e2bbbaaa0ab44 (diff) | |
download | jgit-15147a273fc9085ca3cf459dec42f7a88b22ffbf.tar.gz jgit-15147a273fc9085ca3cf459dec42f7a88b22ffbf.zip |
Add user friendly output from jgit commit command
Instead of printing the stack trace from the JGitInternalException
thrown from CommitMessage.call(), print just the exception
message, using the Die exception.
Change-Id: I9ec3eb02eb001813fa15ac6f90a606223dcdafdc
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java index cc7539b98e..dccf33de08 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java @@ -94,7 +94,12 @@ class Commit extends TextBuiltin { commitCmd.setAmend(amend); commitCmd.setAll(all); Ref head = db.getRef(Constants.HEAD); - RevCommit commit = commitCmd.call(); + RevCommit commit; + try { + commit = commitCmd.call(); + } catch (JGitInternalException e) { + throw die(e.getMessage()); + } String branchName; if (!head.isSymbolic()) |