diff options
author | Thomas Wolf | 2016-01-08 19:21:11 +0000 |
---|---|---|
committer | Thomas Wolf | 2016-01-09 12:24:53 +0000 |
commit | 458ae77e1a11fc58331b0cfd1be9c90de7bd3f85 (patch) | |
tree | 7537d3ebfe519694b9a3ac0623495c4700e76f06 /org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow | |
parent | 790577d275690b5fcc6911a13efee4c8402f2335 (diff) | |
download | egit-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.java | 6 |
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())); |