Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2016-01-08 19:21:11 +0000
committerThomas Wolf2016-01-09 12:24:53 +0000
commit458ae77e1a11fc58331b0cfd1be9c90de7bd3f85 (patch)
tree7537d3ebfe519694b9a3ac0623495c4700e76f06 /org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow
parent790577d275690b5fcc6911a13efee4c8402f2335 (diff)
downloadegit-458ae77e1a11fc58331b0cfd1be9c90de7bd3f85.tar.gz
egit-458ae77e1a11fc58331b0cfd1be9c90de7bd3f85.tar.xz
egit-458ae77e1a11fc58331b0cfd1be9c90de7bd3f85.zip
Show Gitflow submenu in history view only if repo is Gitflow-enabled
Don't display the whole submenu at all if the repo has not been set up for Gitflow. Also enable the "Start release from..." only when the current branch is the development branch, per what the former code did and per [1] and [2]. Note that in the GitFlow context menu in the package explorer, the "Start Feature" and "Start Release" menu items are enabled even if the current branch is not the development branch. I don't know if that is intentional and have therefore left that unchanged. Same for hotfix branches, which according to [1] should branch off master only. [1] http://nvie.com/posts/a-successful-git-branching-model/#release-branches [2] http://danielkummer.github.io/git-flow-cheatsheet/ Change-Id: Ia8ba6401a74cc1f8d6668e549957726e22e8cfaa Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow')
-rw-r--r--org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/internal/menu/DynamicHistoryMenu.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/internal/menu/DynamicHistoryMenu.java b/org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/internal/menu/DynamicHistoryMenu.java
index 796212ccb5..0d8fe69576 100644
--- a/org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/internal/menu/DynamicHistoryMenu.java
+++ b/org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/internal/menu/DynamicHistoryMenu.java
@@ -36,8 +36,8 @@ public class DynamicHistoryMenu extends ContributionItem {
public void fill(Menu menu, int index) {
GitFlowRepository gfRepo = getRepository();
if (gfRepo == null) {
- return;
- }
+ return;
+ }
RevCommit selectedCommit = getSelectedCommit();
if (selectedCommit == null) {
@@ -55,7 +55,7 @@ public class DynamicHistoryMenu extends ContributionItem {
menuItem.addSelectionListener(listener);
try {
- menuItem.setEnabled(!gfRepo.isDevelop());
+ menuItem.setEnabled(gfRepo.isDevelop());
} catch (IOException e) {
Activator.getDefault().getLog()
.log(Activator.error(e.getMessage()));

Back to the top