Skip to content

Commit 41e8c5f

Browse files
Bananeweizenmsohn
authored andcommitted
Hide warning when reconfiguring upstream from local to remote branch
When using a local branch as upstream, the branch creation dialog showed a warning that using a local branch as upstream is not recommended. This warning was not removed when reconfiguring upstream to a remote branch. This regression was introduced with the fix for bug 440097. That one removed the line "setMessage(null)". This fix reintroduces that line, but as "setMessage(initialMessageWhenThePageWasCreated)" instead. This avoids the previously experienced wrong height calculation of the dialog, I have tested that extensively. Bug: 452212 Change-Id: I849c483b5a8a42a80191c4105b102fe4cd5377c4 Signed-off-by: Michael.Keppler <[email protected]> Signed-off-by: Matthias Sohn <[email protected]>
1 parent 54e713d commit 41e8c5f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/CreateBranchPage.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,12 @@ private void checkPage() {
345345
try {
346346
boolean basedOnLocalBranch = sourceRefName
347347
.startsWith(Constants.R_HEADS);
348-
if (basedOnLocalBranch && upstreamConfig != null)
348+
if (basedOnLocalBranch && upstreamConfig != null) {
349349
setMessage(UIText.CreateBranchPage_LocalBranchWarningMessage,
350350
IMessageProvider.INFORMATION);
351+
} else {
352+
setMessage(UIText.CreateBranchPage_ChooseBranchAndNameMessage);
353+
}
351354

352355
if (sourceRefName.length() == 0) {
353356
setErrorMessage(UIText.CreateBranchPage_MissingSourceMessage);

0 commit comments

Comments
 (0)