Bug 458458 - create local branches with same name as remote branch
Summary: create local branches with same name as remote branch
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-26 14:27 EST by Sam Davis CLA
Modified: 2015-02-05 12:53 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Davis CLA 2015-01-26 14:27:08 EST
* right click on a remote branch
* select create branch
* the local branch is named for the active task, with no option to name it the same as the remote branch

It's great that there's support for naming branches based on the active task, but there should be a way to get back the old behaviour when you want it.
Comment 1 Christian Halstrick CLA 2015-01-27 03:08:14 EST
What do you mean with "active task". Mylyn tasks?
Comment 2 Sam Davis CLA 2015-01-27 12:46:44 EST
Yes, that's what I meant.
Comment 3 Christian Halstrick CLA 2015-02-04 08:06:40 EST
I tried it out: when I have an active task, select a remote tracking branch and say "create branch" then I get a dialog where I can type in the new branch name. That field is prefilled with a text based on the name of the active task. I see the remote branch name also. So, I could type in a new name (e.g. a name based on the branch name of the remote branch).

What is your suggestion now? Do you want a preference in EGit telling "no, I never want branch names suggested baseed on active task names". Or do you want in the dialog where you could type in the branch name somehow multiple suggestions: one suggestion coming from core egit telling the branch should be named based on the remote branch name. And another suggestion coming from mylyn based on active task name. (There may be even more suggestions possible: if we detect you work with gerrit and you create branches on tags called "changes/14/791614/1" then a branch name "changes/791614" may be nice)
Comment 4 Sam Davis CLA 2015-02-04 17:37:41 EST
I'm not sure what UI I would want but there ought to be a way to display multiple suggestions. EGit has an extension point that allows other bundles to contribute different suggestions (this is where the active task suggestion comes from), but currently it just uses the first one it finds, so if there were multiple such contributions, the one used would depend on the order in which the bundles loaded. Perhaps a dropdown with the different suggestions would be appropriate.
Comment 5 Christian Halstrick CLA 2015-02-05 03:10:43 EST
I also think having a drop-down list with the multiple suggestions would be nice. If there is only one suggestion then the entry field could be pre-filled with that. But in the case you describe there should be two suggestions: one from mylyn based on active-task-name and one from egit core based on remote-branch-name. I think that's a enhancement request.
Comment 6 Sam Davis CLA 2015-02-05 12:53:53 EST
Maybe, but the thing is, the previous enhancement to add extensibility for suggesting branch names wasn't really completed, so it broke the standard Git behaviour of using the remote branch name. So this is arguably a regression.