Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commands/shared/RebaseCurrentRefCommand.java23
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/RebaseCurrentHandler.java3
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties2
3 files changed, 18 insertions, 10 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commands/shared/RebaseCurrentRefCommand.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commands/shared/RebaseCurrentRefCommand.java
index cd984e2d6e..83694bd13e 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commands/shared/RebaseCurrentRefCommand.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commands/shared/RebaseCurrentRefCommand.java
@@ -57,12 +57,9 @@ public class RebaseCurrentRefCommand extends AbstractRebaseCommandHandler {
BasicConfigurationDialog.show(repository);
- try {
- if (ref != null && ref.getName().equals(repository.getFullBranch()))
- ref = null;
- } catch (IOException ignored) {
- // Ignored
- }
+ String currentFullBranch = getFullBranch(repository);
+ if (ref != null && ref.getName().equals(currentFullBranch))
+ ref = null;
if (ref == null) {
RebaseTargetSelectionDialog rebaseTargetSelectionDialog = new RebaseTargetSelectionDialog(
@@ -79,8 +76,8 @@ public class RebaseCurrentRefCommand extends AbstractRebaseCommandHandler {
}
String jobname = NLS.bind(
- UIText.RebaseCurrentRefCommand_RebasingCurrentJobName, ref
- .getName());
+ UIText.RebaseCurrentRefCommand_RebasingCurrentJobName,
+ Repository.shortenRefName(currentFullBranch), ref.getName());
RebaseHelper.runRebaseJob(repository, jobname, ref);
return null;
}
@@ -123,4 +120,14 @@ public class RebaseCurrentRefCommand extends AbstractRebaseCommandHandler {
}
}
+ private String getFullBranch(Repository repository)
+ throws ExecutionException {
+ try {
+ return repository.getFullBranch();
+ } catch (IOException e) {
+ throw new ExecutionException(
+ UIText.RebaseCurrentRefCommand_ErrorGettingCurrentBranchMessage,
+ e);
+ }
+ }
}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/RebaseCurrentHandler.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/RebaseCurrentHandler.java
index 464c6dc77a..68995c867d 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/RebaseCurrentHandler.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/RebaseCurrentHandler.java
@@ -44,7 +44,8 @@ public class RebaseCurrentHandler extends AbstractHistoryCommandHandler {
Ref ref = getRef(commit, repository, currentBranch);
String jobname = NLS.bind(
- UIText.RebaseCurrentRefCommand_RebasingCurrentJobName, currentBranch);
+ UIText.RebaseCurrentRefCommand_RebasingCurrentJobName,
+ currentBranch, ref.getName());
RebaseHelper.runRebaseJob(repository, jobname, ref);
return null;
}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties
index e18976bee7..90628fe821 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties
@@ -291,7 +291,7 @@ CompareWithIndexAction_FileNotInIndex={0} not in index
RebaseCurrentRefCommand_RebaseCanceledMessage=The rebase operation was canceled
RebaseCurrentRefCommand_RebaseCanceledTitle=Rebase Canceled
-RebaseCurrentRefCommand_RebasingCurrentJobName=Rebasing Branch {0}
+RebaseCurrentRefCommand_RebasingCurrentJobName=Rebasing Branch {0} on {1}
RebaseCurrentRefCommand_ErrorGettingCurrentBranchMessage=Error getting the branch to rebase
RebaseResultDialog_Aborted=Rebase was aborted
RebaseResultDialog_AbortRebaseRadioText=&Abort rebase

Back to the top