*/
package org.eclipse.jgit.pgm;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.jgit.api.DescribeCommand;
import org.eclipse.jgit.api.Git;
+import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.api.errors.RefNotFoundException;
+import org.eclipse.jgit.errors.InvalidPatternException;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.pgm.internal.CLIText;
import org.kohsuke.args4j.Argument;
/** {@inheritDoc} */
@Override
- protected void run() throws Exception {
+ protected void run() {
try (Git git = new Git(db)) {
DescribeCommand cmd = git.describe();
if (tree != null)
throw die(CLIText.get().noNamesFound);
outw.println(result);
+ } catch (IOException | InvalidPatternException | GitAPIException e) {
+ throw die(e.getMessage(), e);
}
}
}