Include local branch name in proposals
commitffa3b9913f7de7974e8aa6e5609ee1ab55c4c3fe
authorThomas Wolf <thomas.wolf@paranor.ch>
Mon, 12 Feb 2018 10:18:43 +0000 (12 11:18 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Tue, 13 Feb 2018 00:16:13 +0000 (13 01:16 +0100)
treeff5875fd9c7c1ea5e9a416c5327dc7dcbad97f72
parent56bfb4ea9d16b8b73b2d91a47cade016f7596c0b
Include local branch name in proposals

If "Push branch 'foo'" is run the default suggestion for the
upstream name is the configured remote tracking branch (if any).
The local branch name is suggested initially only if no remote
tracking branch is set.

A frequent use case for this dialog is to push a local branch to
a *new* remote branch with the same name as the local branch. But
since typically local branches are created off 'master' and do
have 'origin/master' set as tracking branch, a user has in this
case to type in the new upstream branch name. It wouldn't appear
in the proposals list, which showed only existing upstream refs.

Simplify this use case by including a ref for a new upstream branch
in the list of proposals if there is no existing upstream branch
with the same name as the local branch.

Bug: 530685
Change-Id: I861d0ab73ed9476e664e5fe203da3a84829ce04f
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/AsynchronousListOperation.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/AsynchronousRefProposalProvider.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/RefContentProposal.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/fetch/FetchGerritChangePage.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushBranchPage.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties