Created attachment 134271 [details]
Shows the dialog which needs the improvement
When selecting a remote branch AND checking it out as a new branch (by toggling the "checkout as new branch" checkbox) I want the textfield field of the local branchname filled-in automatically. Currently I have to type the branch name manually. The standard usecase in enterprises is to keep the same branch name (from the remote branch) - else the communication between the devs gets complicated.
EXPECTED: fill in the branch name automatically, the user can still edit it afterwards.
* By selecting "origin/branch-2_3" the "branch-2_3" is filled into the textfield
* By selecting "mylocalbranch-2_5" the "mylocalbranch-2_5" is filled into the textfield (and of course there will be a warning, that would be OK)
Created attachment 134301 [details]
I like to propose the following patch. It automatically fills-in the local branch name based on the remote branch name.
@Ondrej: Please review and commit if appropriate.
any reason the patch contained:
> final boolean localBranchExists = branches.containsKey(rev);
? IMO it should be:
> final boolean localBranchExists = branches.containsKey(localBranch);
pushed as core-main #85bdf99800ef
(In reply to comment #2)
> any reason the patch contained:
> > final boolean localBranchExists = branches.containsKey(rev);
> ? IMO it should be:
> > final boolean localBranchExists = branches.containsKey(localBranch);
Thanks for the review. It was NO intention.
Integrated into 'main-golden', will be available in build *201305142300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Benno Markiewicz <email@example.com>
Log: Issue #229555 - [Switch to selected branch]: automatically fill in local branch name based on the remote branch name
Verified in 201307312300