diff options
Diffstat (limited to 'org.eclipse.jgit.ant/src')
-rw-r--r-- | org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitCloneTask.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitCloneTask.java b/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitCloneTask.java index 0794bf1d55..f40b7b1e23 100644 --- a/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitCloneTask.java +++ b/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitCloneTask.java @@ -45,10 +45,10 @@ package org.eclipse.jgit.ant.tasks; import java.io.File; import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; import org.eclipse.jgit.api.CloneCommand; import org.eclipse.jgit.api.Git; -import org.eclipse.jgit.api.errors.JGitInternalException; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.transport.URIish; @@ -107,10 +107,11 @@ public class GitCloneTask extends Task { log("Cloning repository " + uri); CloneCommand clone = Git.cloneRepository(); - clone.setURI(uri).setDirectory(destination).setBranch(branch).setBare(bare); try { + clone.setURI(uri).setDirectory(destination).setBranch(branch).setBare(bare); clone.call(); - } catch (JGitInternalException e) { + } catch (RuntimeException e) { + log("Could not clone repository: " + e, e, Project.MSG_ERR); throw new BuildException("Could not clone repository: " + e.getMessage(), e); } } |