DESCRIPTION

Suggest name when source ref is selected in new branch dialog

If the branch name text is empty or has not been modified by the user,
suggest a branch name based on the selected source ref.

So when "refs/remotes/origin/stable-1.0" is selected, we pre-fill the
text with a suggestion of "stable-1.0", which is usually what is wanted
anyway.

Change-Id: I061d33dad289d93d6be41e1e902ed373168b1e2c
Signed-off-by: Danika Greer xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2011-08-26 12:00:28.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2011-08-26 12:11:41.000000000

Patch Set 1: I would prefer that you didn't submit this

Build Unstable 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/1545/ : UNSTABLE

-------------------------------------
author: Carlie Harper
date: 2011-09-02 13:43:53.000000000

Patch Set 1: I would prefer that you didn't submit this

(1 inline comment)

Please see my inline comment.

Line:448, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/CreateBranchPage.java -> There is already coding for that in line 311 ff which is used when the dialog is opened. There the suggestion is only made if the base ref starts with "remotes" or is a tag. I think it makes sense. E.g., I have a local branch created by the "Fetch from Gerrit..." funcionality called "change/3435/1" and the suggested name then is 1.

I do not care much about this, but what I think is more important is that the behavior should be consistent for the two cases: opening the dialog on a branch and switching the "Source ref" in the dialog with the drop down. This should be reflected in the coding also.

-------------------------------------
author: Juliet Cantu
date: 2011-09-06 01:13:16.000000000

Patch Set 1: (1 inline comment)



-------------------------------------
author: Carlie Harper
date: 2011-09-06 07:12:31.000000000

Patch Set 1: (1 inline comment)



Line:448, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/CreateBranchPage.java -> Robin: No, I don't think it's obsolete. You can open the dialog from a remote branch node in the Repositories View by selecting "Create Branch...". Then the branch is preselected in the Combo Box.

-------------------------------------
author: Danika Greer
date: 2011-09-06 08:00:19.000000000

Patch Set 1: (1 inline comment)



Line:448, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/CreateBranchPage.java -> Robin R: What you're describing is similar to how it worked before, isn't it? Where there was a "Team -> Branch..." menu and then different Buttons (Checkout and Create Branch, IIRC). I agree that the "New branch" dialog is not very usable at the moment.

-------------------------------------
author: Juliet Cantu
date: 2011-09-06 01:13:15.000000000

MISMATCHED INLINE COMMENT
Line:448, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/CreateBranchPage.java -> Stefan: That code is, I think obsolete since if you check out a remote branch/tag you'll get a detached head and that code only works from the "current" branch when the dialog is initialized.

The "New branch" dialog as I see it is pretty useless with many remote branches. It might be better to integrate the "New" option into the "Other.." menu which brings up a tree view, which is easier to browse and has some filtering capability.

Other than that, I also thing the suggestion should only be present for remote branches and tags.

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