Bug 530685 - push branch autocomplete should suggest current branch name
Summary: push branch autocomplete should suggest current branch name
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 4.11   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.11   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-03 02:58 EST by Michael Keppler CLA
Modified: 2018-02-13 02:55 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Keppler CLA 2018-02-03 02:58:24 EST
The branch name auto-completion of the "Push branch" dialog only suggests the names of currently existing branches of the target remote. I often want to push the current branch under the exact same name (while it is still configured with another upstream remote) and have to re-type the complete branch name manually.

The list of auto-complete suggestions in the branch name edit field should therefore always include the current local branch name (even if it does not exist on the remote).
Comment 1 Matthias Sohn CLA 2018-02-03 04:35:17 EST
good idea, maybe we should show a hint if the target branch doesn't yet exist ?
Comment 2 Thomas Wolf CLA 2018-02-03 04:51:30 EST
That push branch dialog needs a major overhaul anyway. The content assist kicks in as soon as you start typing a branch name, and it is blocking. This is especially annoying if you want the push to create a new upstream branch.

This content assist should be made non-blocking, like in the "Fetch from Gerrit" wizard. Doing so is a bit of work; I think that asynchronous ChangeList stuff in FetchGerritChangePage should be factored out, be generalized, and then be re-used in both.

Additionally, the dialog currently pre-fills the field with the remote tracking branch name if one is set. But if I wanted to push to that, I'd just use "push to upstream", so it's questionable whether that makes sense. Maybe the field should be pre-filled with the local branch name instead?

A hint when the push would create a new branch is IMO not necessary since it might not always be correct. Maybe someone else creates such an upstream branch after we had fetched the existing upstream branches. IIRC, the next page of the wizard will show the expected push result anyway, and will indicate "[new branch]" if a new branch would be created upstream.
Comment 3 Eclipse Genie CLA 2018-02-04 11:06:04 EST
New Gerrit change created: https://git.eclipse.org/r/116679
Comment 4 Eclipse Genie CLA 2018-02-04 11:06:07 EST
New Gerrit change created: https://git.eclipse.org/r/116676
Comment 5 Thomas Wolf CLA 2018-02-04 11:48:25 EST
These two commits are part of a whole series that make the content assist in this dialog asynchronous, fix some minor bugs along the way, and finally add the local branch name to the proposals. All marked in Gerrit by the topic "push-branch-wizard".
Comment 6 Eclipse Genie CLA 2018-02-13 02:39:25 EST
Gerrit change https://git.eclipse.org/r/116676 was merged to [master].
Commit: http://git.eclipse.org/c/.git/commit/?id=83758204267e3768c67aed2a4683f747bcffea0c