DESCRIPTION

Offer to create branch when checking out remote-tracking branch

A common mistake for new users of EGit is that they want to work on a
branch existing on a remote and therefore check out the remote-tracking
branch. Instead the right thing to do would have been to create a new
local branch based on it.

This change shows a question whether to create a new local branch or
whether to check out the commit behind the remote-tracking branch.

To make it clear that there will be a question, the label is
"Checkout..." instead of "Checkout" when a remote-tracking branch is
selected.

Bug: 341679
Change-Id: I8701aee4bb12de0848f4820a3f7725435cbf106d
Signed-off-by: Danika Greer xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2013-09-02 03:10:50.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/4842/

-------------------------------------
author: Brenden Conley
date: 2013-09-02 03:25:04.000000000

Patch Set 1: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/egit/job/egit.gerrit/4842/ : UNSTABLE

-------------------------------------
author: Douglas Trujillo
date: 2013-09-02 07:08:43.000000000

Patch Set 1:

could you add a preference to disable this question ?

-------------------------------------
author: Danika Greer
date: 2013-09-02 07:20:37.000000000

Patch Set 1:

Is that really necessary? How often do you check out remote-tracking branches directly that the extra click gets in the way?

The reasons I'm skeptical for adding this are:

* It would make the dialog more complicated for new users.
* What would the action be if it was disabled? Detached HEAD, or configurable?
* The code adjusting the labels would also need to check the preference.

-------------------------------------
author: Douglas Trujillo
date: 2013-09-10 22:25:07.000000000

Patch Set 1:

we could reuse the already existing preference allowing to disable "Detached HEAD warning" to decide on this, I'd assume if a user doesn't want this warning he knows the effect of a detached HEAD.

I would want detached HEAD if this warning is switched off

-------------------------------------
author: Danika Greer
date: 2013-09-11 20:06:46.000000000

Patch Set 1: Code-Review-2

I like that, good idea! It requires checking the preference before changing the label to "Checkout...", I'll update the change.

-------------------------------------
