|
|
|
@ -155,12 +155,10 @@ public class CloneCommand extends TransportCommand<CloneCommand, Git> {
|
|
|
|
|
config.addURI(u); |
|
|
|
|
|
|
|
|
|
final String dst = (bare ? Constants.R_HEADS : Constants.R_REMOTES |
|
|
|
|
+ config.getName() + "/") + "*"; |
|
|
|
|
+ config.getName() + "/") + "*"; //$NON-NLS-1$//$NON-NLS-2$
|
|
|
|
|
RefSpec refSpec = new RefSpec(); |
|
|
|
|
refSpec = refSpec.setForceUpdate(true); |
|
|
|
|
refSpec = refSpec.setSourceDestination( |
|
|
|
|
Constants.R_HEADS + "*", dst); //$NON-NLS-1$ //$NON-NLS-2$
|
|
|
|
|
|
|
|
|
|
refSpec = refSpec.setSourceDestination(Constants.R_HEADS + "*", dst); //$NON-NLS-1$
|
|
|
|
|
|
|
|
|
|
config.addFetchRefSpec(refSpec); |
|
|
|
|
config.update(clonedRepo.getConfig()); |
|
|
|
@ -183,7 +181,7 @@ public class CloneCommand extends TransportCommand<CloneCommand, Git> {
|
|
|
|
|
private List<RefSpec> calculateRefSpecs(final String dst) { |
|
|
|
|
RefSpec wcrs = new RefSpec(); |
|
|
|
|
wcrs = wcrs.setForceUpdate(true); |
|
|
|
|
wcrs = wcrs.setSourceDestination(Constants.R_HEADS + "*", dst); //$NON-NLS-1$ //$NON-NLS-2$
|
|
|
|
|
wcrs = wcrs.setSourceDestination(Constants.R_HEADS + "*", dst); //$NON-NLS-1$
|
|
|
|
|
List<RefSpec> specs = new ArrayList<RefSpec>(); |
|
|
|
|
if (cloneAllBranches) |
|
|
|
|
specs.add(wcrs); |
|
|
|
|