Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] ColneCommand won't clone all branches

Hi,

I just built jgit from the stable-0.12 branch. I wrote a method for cloning a repository using this build. The code looks like this:

  CloneCommand clone = Git.cloneRepository();
  clone.setDirectory(new File(dst.getPath()));
  clone.setURI("file://" + src.getPath());
  clone.setCloneAllBranches(true);
  
  Git git = clone.call();
  if (git != null) {
    git.getRepository().close();
  }

The source repository (in src.getPath() directory) has two branches: master and branch_a. The above code executes without exception, but the cloned repository contains only branch_a. Is there a bug here or I miss something?

Thanks in advance,
Ákos Tajti


Back to the top