Skip to main content

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


now I see the problem. There is indeed one functionality of git-clone
in native git where jgit behaves differently. See
the following script:

$ git clone
$ cd mergeExample/
$ git branch
* master
$ git branch -a
* master
  remotes/origin/HEAD -> origin/master
$ cd ..
$ git clone --bare
$ cd mergeExample.git/
$ git branch
* master
$ git branch -a
* master

A native git-clone with '--bare' option will not create remote
tracking branches but local branches with the same name as the remote
branches. A native git-clone without '--bare' will create remote
tracking branches for all branches found remotely. Those remote
tracking branches are not listed by 'git-branch' by default. JGit, in
contrast, will always create the remote tracking branches. That can be
easily fixed so that JGit by default also does not create remote
tracking branches on cloning bare repos. I'll propose a fix.


Back to the top