DESCRIPTION

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: Alayna Houston xxx@xxx.xxx

COMMENTS

author: Alayna Houston
date: 2016-01-09 12:26:04.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2016-01-09 12:26:10.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/7994/

-------------------------------------
author: Brenden Conley
date: 2016-01-09 12:27:09.000000000

Patch Set 1: Verified-1

Build Failed 

https://hudson.eclipse.org/egit/job/egit.gerrit/7994/ : FAILURE

-------------------------------------
author: Alayna Houston
date: 2016-01-09 12:31:40.000000000

Patch Set 1:

Build failure is due to some JAR signer problem: Connect to build.eclipse.org:31338 [build.eclipse.org/172.25.25.57] failed: Connection refused

-------------------------------------
author: Brenden Conley
date: 2016-01-09 15:14:02.000000000

Patch Set 1: -Verified

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/7995/

-------------------------------------
author: Brenden Conley
date: 2016-01-09 15:14:48.000000000

Patch Set 1: Verified-1

Build Failed 

https://hudson.eclipse.org/egit/job/egit.gerrit/7995/ : FAILURE

-------------------------------------
author: Brenden Conley
date: 2016-01-09 22:56:36.000000000

Patch Set 1: -Verified

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/7996/

-------------------------------------
author: Brenden Conley
date: 2016-01-09 23:20:31.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/7996/ : SUCCESS

-------------------------------------
author: Jamarion Hunt
date: 2016-01-19 23:01:46.000000000

Patch Set 1: Code-Review-1

(1 comment)

I see this as an improvement over I8bc769f6, but the check for isDevelop() should be removed, or better, replaced with a check if the selected commit is on develop.

Line:58, org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/internal/menu/DynamicHistoryMenu.java -> See my comment here:
xxx@xxx.xxx

This can both prevent legitimate use of this operation, as well as allow illegitimate use.
I think we can remove this check (with your introduction of the test in plugin.xml), and should rather check if the commit is on develop.

-------------------------------------
author: Alayna Houston
date: 2016-01-20 08:15:38.000000000

Patch Set 1:

> (1 comment)
 > 
 > I see this as an improvement over I8bc769f6, but the check for
 > isDevelop() should be removed, or better, replaced with a check if
 > the selected commit is on develop.

Makes sense. However, two points:

1. This change here just tries to make the logic consistent with what we had before xxx@xxx.xxx .

2. Figuring out whether a commit is on the devlop branch may be a potentially costly operation. I'm not sure it can be done here, but that would have to be tried. Also, _which_ develop branch must the commit be on: local or remote? Must it be tip of the branch, or is it OK to branch off an older commit on develop?

If you can do (2) efficiently, feel free to take over this change and do it right in this change. Otherwise I suggest we do submit this and implement (2) in a follow-up change.

-------------------------------------
author: Jamarion Hunt
date: 2016-01-21 23:59:16.000000000

Patch Set 1: Code-Review+2

> If you can do (2) efficiently, feel free to take over this change
 > and do it right in this change. Otherwise I suggest we do submit
 > this and implement (2) in a follow-up change.

I see no reason _not_ to split this into smaller changes. => Approved
We can discuss the efficiency in the second change.

Usually Gitflow is about simplicity. I assume the articles you posted previously would specify, if e.g. 'origin/develop' is allowed. But that is only my interpretation.

-------------------------------------
author: Gerrit Johnathan Pham
date: 2016-01-22 00:00:53.000000000

Change has been successfully merged into the git repository by Jamarion Hunt

-------------------------------------
