Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Branch selection during the clone operation

I would strongly recommend against "fixing" the fetch configuration, if the user clones only some branches. We should leave that for the experts to configure themselves.

AFAIK most Git users do not understand the fetch configuration and if we restrict something here, it will be really hard for them to undo that.

What about a "Skip branch selection" flag on the first page which is selected by default and allows to skip the second page?

Best regards, Lars


Am 23.08.2016 5:25 nachm. schrieb "Matthias Sohn" <matthias.sohn@xxxxxxxxx>:
On Tue, Aug 23, 2016 at 4:07 PM, Lars Vogel <lars.vogel@xxxxxxxxxxx> wrote:
Hi,

During the repo clone operation in Eclipse, I frequently see people
stopping at the branch selection wizard page and trying to figure out
which branches they should selected.

As remote tracking branches anyway are updated during each pull
operation and are cheap, I suggest to remove this page from the
wizard.

Branches themselves are cheap but if branches diverged a lot then
not cloning all branches may reduce the number of commits to be
transferred heavily which can speed-up cloning considerably.

EGit should not configure

[remote "origin"]
url = "" href="https://git.eclipse.org/r/egit/egit" target="_blank">https://git.eclipse.org/r/egit/egit
fetch = +refs/heads/*:refs/remotes/origin/*

if only selected branches are cloned bug (if e.g. only master is cloned):

[remote "origin"]
    url = "" href="https://git.eclipse.org/r/egit/egit" target="_blank">https://git.eclipse.org/r/egit/egit
    fetch = +refs/heads/master:refs/remotes/origin/master

then pull/fetch would only update the selected branch
 
This would also be closer to the git clone operation on the command
line, which also does not ask you which branches to clone.


but it has options to achieve the same, e.g.:

$ git clone --branch master --single-branch https://git.eclipse.org/r/egit/egit
 
If you agree, I create a bug report and try to provide a Gerrit for the change.

I suggest we fix the wrong fetch configuration instead. If you think
this option should be less prominent in order to not confuse beginners
we could consider to make it more obvious that selecting branches is
optional.

-Matthias 

Back to the top