Преглед на файлове

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
tags/v2.0.0.201206130900-r
Mikael Karlsson преди 12 години
родител
ревизия
15147a273f
променени са 1 файла, в които са добавени 6 реда и са изтрити 1 реда
  1. 6
    1
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java

+ 6
- 1
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())

Loading…
Отказ
Запис