DESCRIPTION

Fixed: Specifying non-existing master does not abort initialization

- abort init operation if master is missing
- added validator for missing master branch
- ask user to create master branch
- added control decorations to hint at source of problem
- adjusted tests

Bug: 475788
Change-Id: Ief9b1a361a3dce83358e7b84034bb6a477ec92e4
Signed-off-by: Jamarion Hunt xxx@xxx.xxx

COMMENTS

author: Jamarion Hunt
date: 2015-08-30 16:32:32.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2015-08-30 16:47:03.000000000

Patch Set 3:

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

-------------------------------------
author: Brenden Conley
date: 2015-08-30 17:08:56.000000000

Patch Set 3: Verified+1

Build Successful 

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

-------------------------------------
author: Douglas Trujillo
date: 2015-09-07 22:32:43.000000000

Patch Set 3: Code-Review-1

(1 comment)

found this problem:
- create new Java project
- share it with git team provider and create a repository
- click "init gitflow" (repository is still empty, HEAD doesn't exist yet)
- in "Initialize repository" dialog choose non-default master branch e.g. master1
- gitflow warns that this master branch doesn't exist and asks if I want to create it
- click yes
- this hits the following exception

 org.eclipse.egit.gitflow.WrongGitFlowStateException: Git flow repository may not be empty.
	at org.eclipse.egit.gitflow.GitFlowRepository.findHead(GitFlowRepository.java:147)
	at org.eclipse.egit.gitflow.ui.internal.dialogs.InitDialog.okPressed(InitDialog.java:281)
	... 62 more

- the error is not shown in an error dialog but ends up in the error log only, so I
  can't leave the "Initialize repository" dialog until I click "Cancel"
- if initializing a gitflow repository requires HEAD then the action "Init Git Flow"
  should be disabled if HEAD doesn't exist / repository is empty
- or "Init Git Flow" should work on empty repository
- don't know how native gitflow handles this

- if I first create an initial commit the dialog works and I can create the
non-standard "master1" branch but then I already have a "master" branch and
have to delete that (I want the non-standard master1 branch and why should I
also use a master branch ?), so it looks like it would be better to rename
master to master1 instead of creating both.

Line:64, org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/Activator.java -> warning status for given message

-------------------------------------
author: Gerrit Johnathan Pham
date: 2015-09-10 11:46:35.000000000

Change has been successfully merged into the git repository by Douglas Trujillo

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