[ 
https://issues.apache.org/jira/browse/CAMEL-15051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17105539#comment-17105539
 ] 

John Yin commented on CAMEL-15051:
----------------------------------

Andrea, first thank you very much for investigating this matter and for 
suggesting to use the "checkout" operation which is not mentioned in the latest 
Camel GIT doc [https://camel.apache.org/components/latest/git-component.html]).

I tried the "checkout" operation which did not work as expected.  Let's say the 
repo that was cloned has two branches: master and branch_uat, and the master 
branch is behind the branch_uat.  When the clone is done, the master branch is 
checked out and the origin/branch_uat is "hidden" in the local repository.  
After running the checkout operation, a local branch branch_uat is created by 
Camel GIT but it is based on the master branch (thus behind the 
origin/branch_uat).  Even if I do another pull operation on the branch_uat, it 
still does not advance the branch_uat to the origin/branch_uat.  So I am 
essentially stuck with the master branch.

I will try any other workaround that you may suggest, but also look forward to 
the permanent fix in 3.4.0.

Thanks!

> Camel GIT component does not check out the branch specified in branchName 
> when cloning
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-15051
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15051
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-git
>    Affects Versions: 3.2.0
>         Environment: This was tested on Windows 10 Pro with Camel 3.2.0 
> (Spring Boot 2.2.6) against GitHub.
>            Reporter: John Yin
>            Assignee: Andrea Cosentino
>            Priority: Major
>             Fix For: 3.4.0
>
>
> When cloning a repository from a server (tested with GitHub) with the 
> following Camel endpoint/options:
> git:///F:\localpath?operation=clone&remotePath=[https://github.com/xxxxxxxx/cust-ir.git&username=xxxxxxxx&password=yyyyyyyy&remoteName=origin&branchName=branch_uat&synchronous=true]
> The remote repository was correctly cloned to the localpath, but the branch 
> specified is not created locally and not checked out.  The localpath working 
> copy is the master branch.  Since Camel GIT does not have a checkout command, 
> one would have to manually checkout the branch thus defeat the purpose of 
> using the component.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to