Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » EGit (or maybe JGit) checks out the wrong branch
icon9.gif  EGit (or maybe JGit) checks out the wrong branch [message #789057] Thu, 02 February 2012 14:58 Go to next message
Matthew Webber is currently offline Matthew WebberFriend
Messages: 198
Registered: December 2010
Senior Member
A repository on GitHub has a default branch of "master", but when I check it out using EGit/JGit, it checks out a branch called "1.0". If I "git clone" using the command line, it checks out the "master" branch as expected.

Here's how to reproduce the problem:

  1. In the "Git Repsoitories" view, I click on "Clone a Git repository and add the clone to this view". I enter the URI (git://github.com/DawnScience/dawn-edna.git in this case).
  2. I click "Next", it shows me the branches on the remote.
  3. I click "Next", where I can select the initial branch.

The problem here is that the value of "initial branch" displayed in the UI is the branch that was most recently committed to, not the remote's default branch. I think this behaviour by EGit is incorrect.

What's the problem, you say? Why don't I change the initial branch drop-down box to "master", if that's what I want? Well, my problem is that I am using Buckminster to drive the checkout, and I never get to select the initial branch. Buckminster is just asking EGit (or maybe JGit) to clone the repository, but it's not getting back the correct result (default branch).

Is there a good reason for the existing behaviour, or should I file a bug? Any idea whether the fix is to EGit or JGit?

Thanks
Matthew
Re: EGit (or maybe JGit) checks out the wrong branch [message #789153 is a reply to message #789057] Thu, 02 February 2012 17:12 Go to previous messageGo to next message
Kevin Sawicki is currently offline Kevin SawickiFriend
Messages: 47
Registered: September 2011
Member
I think this may be been fixed in this commit: https://github.com/eclipse/egit/commit/5bc0ecfc2b74ea28ce0d582392b63dbe02ce7429

Have you tried using the 1.3 nightlies?
Re: EGit (or maybe JGit) checks out the wrong branch [message #789179 is a reply to message #789153] Thu, 02 February 2012 17:50 Go to previous messageGo to next message
Matthew Webber is currently offline Matthew WebberFriend
Messages: 198
Registered: December 2010
Senior Member
Thanks for the quick response. I'm currently using the latest released version - Indigo SR1 (3.7.1) with EGit 1.1.0.201109151100-r, but I'll test the nightly out tomorrow.

Do you know when the next release is planned? If looks like an EGit 1.2 was planned for Dec 2011, but was never released ...

Matthew
Re: EGit (or maybe JGit) checks out the wrong branch [message #789665 is a reply to message #789179] Fri, 03 February 2012 08:47 Go to previous messageGo to next message
Manuel Doninger is currently offline Manuel DoningerFriend
Messages: 119
Registered: October 2010
Senior Member
EGit 1.2 was released. The update site is at http://download.eclipse.org/egit/updates. I don't know if that release was also deployed to the Indigo repository.
The next release is 1.3, and i think it is planned in the next weeks (AFAIK IP review has already started).
Re: EGit (or maybe JGit) checks out the wrong branch [message #789697 is a reply to message #789665] Fri, 03 February 2012 09:35 Go to previous messageGo to next message
Matthew Webber is currently offline Matthew WebberFriend
Messages: 198
Registered: December 2010
Senior Member
I can confirm that the bug is fixed in the nightly build (though not in 1.2).

Releases: it looks like Eclipse Indigo 3.7.1 includes EGit 1.1.0, and the EGit 1.2.0 release was not pushed to the Indigo update site (hence "check for updates" won't find it). However, enabling the main EGit p2 site (as descibed at http://eclipse.org/egit/download/) allows EGit 1.2.0 to be easily installed into Indigo.

Thank you Kevin and Manuel for your quick and accurate responses.

Matthew
Re: EGit (or maybe JGit) checks out the wrong branch [message #793643 is a reply to message #789665] Wed, 08 February 2012 11:34 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
Since the last Indigo release SR1 was in September there was no chance to ship EGit 1.2 in Indigo repository so it was shipped from the EGit repository. The next release 1.3 will be tagged next week and shipped with Indigo SR2 one week later. Refer to the EGit download page [1] to find out where to find which version.

[1] http://www.eclipse.org/egit/download/
Previous Topic:How to install egit plugin on Eclipse 3.7.1 (Indigo)?
Next Topic:git remote add [alias] [url]
Goto Forum:
  


Current Time: Fri Apr 19 19:28:33 GMT 2024

Powered by FUDForum. Page generated in 0.03758 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top