Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKetan Padegaonkar2011-05-19 08:32:02 +0000
committerChris Aniszczyk2011-05-19 16:13:12 +0000
commitd60001c83bfd2dd5170dc1a9377d6eec422b8619 (patch)
tree5c3e9a97364205aae817cdecab0f0b4311fd948b /org.eclipse.jgit.ant
parent5ec4977bb514ec8eb01dd22c3e908fe3fe6da83f (diff)
downloadjgit-d60001c83bfd2dd5170dc1a9377d6eec422b8619.tar.gz
jgit-d60001c83bfd2dd5170dc1a9377d6eec422b8619.tar.xz
jgit-d60001c83bfd2dd5170dc1a9377d6eec422b8619.zip
Add GitCloneTaskTest
Change-Id: Iec8cd032d8d659a896d909f9094f76b7d35147e6 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.ant')
-rw-r--r--org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitCloneTask.java7
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);
}
}

Back to the top