Exact equivalent to "git clone -b <branch> <repository>" in jgit [message #1847014] |
Tue, 12 October 2021 05:12  |
Eclipse User |
|
|
|
I have a local mirror of a quite big repository.
If I do:
git clone -b branch-name /home/where/my/local/mirror/is clone-dir
I end up with a clone of my local mirror in the "clone-dir" repository in 4 seconds.
While trying to do the same thing using jgit I can't make it faster than 220 seconds:
Git.cloneRepository()
.setBranch("branch-name")
.setURI("file:///home/where/my/local/mirror/is")
.setDirectory(new File("/tmp/clone-dir"))
.call();
I would like to understand what are the differences between the 2 approaches and if there is a way in jgit to do exactly what the "git clone" command is doing.
Thanks,
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04044 seconds