You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2015/07/18 11:09:37 UTC

[20/23] camel git commit: CAMEL-7982: Use instantiated git also in init and clone producer operation

CAMEL-7982: Use instantiated git also in init and clone producer operation


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3d154430
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3d154430
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3d154430

Branch: refs/heads/master
Commit: 3d154430015fd925d8e192005f59b73197124554
Parents: 4653526
Author: Andrea Cosentino <an...@gmail.com>
Authored: Sat Jul 18 11:07:29 2015 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Sat Jul 18 11:08:17 2015 +0200

----------------------------------------------------------------------
 .../org/apache/camel/component/git/producer/GitProducer.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/3d154430/components/camel-git/src/main/java/org/apache/camel/component/git/producer/GitProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-git/src/main/java/org/apache/camel/component/git/producer/GitProducer.java b/components/camel-git/src/main/java/org/apache/camel/component/git/producer/GitProducer.java
index 57a6e01..6e6a783 100644
--- a/components/camel-git/src/main/java/org/apache/camel/component/git/producer/GitProducer.java
+++ b/components/camel-git/src/main/java/org/apache/camel/component/git/producer/GitProducer.java
@@ -147,7 +147,7 @@ public class GitProducer extends DefaultProducer {
         try {
             File localRepo = new File(endpoint.getLocalPath(), "");
             if (!localRepo.exists()) {
-                result = Git.cloneRepository().setURI(endpoint.getRemotePath()).setDirectory(new File(endpoint.getLocalPath(), "")).call();
+                result = git.cloneRepository().setURI(endpoint.getRemotePath()).setDirectory(new File(endpoint.getLocalPath(), "")).call();
             } else {
                 throw new IllegalArgumentException("The local repository directory already exists");
             }
@@ -165,7 +165,7 @@ public class GitProducer extends DefaultProducer {
             throw new IllegalArgumentException("Local path must specified to execute " + operation);
         }
         try {
-            result = Git.init().setDirectory(new File(endpoint.getLocalPath(), "")).setBare(false).call();
+            result = git.init().setDirectory(new File(endpoint.getLocalPath(), "")).setBare(false).call();
         } catch (Exception e) {
             LOG.error("There was an error in Git " + operation + " operation");
             throw e;