Skip to content
This repository has been archived by the owner on Dec 18, 2022. It is now read-only.

Allow creating a branch from a custom origin. #6

Closed
yveszoundi opened this issue Feb 25, 2015 · 1 comment
Closed

Allow creating a branch from a custom origin. #6

yveszoundi opened this issue Feb 25, 2015 · 1 comment

Comments

@yveszoundi
Copy link
Member

From email:

I have a real quick question regarding how to checkout branch tags from an exisiting repository using your custom ant task.

<git:git directory="${library.directory}" verbose="true" settingsRef="git.refID">
  <git:clone uri="<url>.git"/>
  <git:checkout branchName="origin/master" createBranch="true"/>
</git:git>

From reading the wiki this seems to be correct for checking out a remote branch, but I need to be able to checkout a particular branch tag.

Answer/Possible workaround:
I think that I should expose the setStartPoint method from JGit:
http://download.eclipse.org/jgit/docs/jgit-2.3.1.201302201838-r/apidocs/org/eclipse/jgit/api/CheckoutCommand.html#setStartPoint(java.lang.String)

Alternatively, you should be might able to get away with it by doing the following:

<git:git ...>
  <git checkout yourtag/>
 <git checkout your branch create=true/>
   </git:git>
yveszoundi added a commit that referenced this issue Feb 25, 2015
@yveszoundi
Copy link
Member Author

Added startPoint attribute to git:checkout. This should allow specifying a custom tag.

yveszoundi added a commit that referenced this issue Feb 25, 2015
yveszoundi added a commit that referenced this issue Apr 18, 2015
- Rename java file accordingly.
- Add integration test.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant