|
|
|
|
|
Re: How to clone a single branch in JGit [message #1694504 is a reply to message #1692918] |
Tue, 05 May 2015 17:06 |
Julian Enoch Messages: 24 Registered: January 2014 |
Junior Member |
|
|
On the same flow of idea, now that I have a single-branched clone, when I pull, all the remote branches are fetched, and I don't have a single-branched repo anymore!
I found out the cause is that CloneCommand sets the following fetch ref spec, regardless of whether this is a single branch clone or not:
fetch = +refs/heads/*:refs/remotes/origin/*
This is actually not consistent with native git where if you create a single branch clone you get the expected:
fetch = +refs/heads/master:refs/remotes/origin/master
Subsequently, if you do a pull, only the changes in your branch are fetched, which is the desired behavior.
If you agree with this, CloneCommand needs to be fixed. What do you think?
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04305 seconds