DESCRIPTION

Added check for warnings and errors before commit

Bug: 475559
Change-Id: I352c33d0fed1b610babda2992c6b1b211952dfb2
Signed-off-by: Reilly Hart xxx@xxx.xxx

COMMENTS

author: Reilly Hart
date: 2015-08-27 16:33:44.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2015-08-27 16:33:51.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2015-08-27 16:57:42.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Reilly Hart
date: 2015-08-27 19:54:27.000000000

Patch Set 2: Code-Review+1

-------------------------------------
author: Douglas Trujillo
date: 2015-08-27 23:02:33.000000000

Patch Set 2: Code-Review-1

* this only works when committing using the commit dialog, you can also commit in a non-modal way using the staging view. This should behave in the same way.

I think there are a couple of usability issues (see screenshot http://i.imgur.com/ov0YKc9.png):
* the warning dialog looks complex since it shows a lot of text and 2 tables I have to read
* the text in the title and the first sentence of the warning text are pretty similar
* it's not easy to spot the question "Do you still want to commit those files?" which I need to find in order to understand what will happen when I click the Ok or Cancel button, I think it should be closer to these buttons
* there's a lot of text to say I can open the problem view
* the link to the problems doesn't really help since I can't open the top level nodes, with my view configuration it shows Errors(3 items), Warnings (17 items) but I can't open these nodes since I have 2 modal dialogs on top of the view

Most of the information is already available in the underlying commit dialog/staging view: it shows the list of files to be committed decorated with warning or error overlay icons. 

How about this proposal avoiding an additional dialog :
* if there are warnings/errors unconditionally (no preference) show the warning text with a checkbox directly in the commit dialog/staging view. The staging view already has an area for warnings which is used e.g. to warn if the second line of the commit message isn't empty.
* provide a preference which when set and there are problems disable the commit button and waits for explicit confirmation that commit should be done ignoring problems
* if this preference is set and there are any warnings/errors disable the commit button, show a checkbox "Commit and ignore warnings/errors" above the commit button to allow overriding the check

 Commit message header

 Commit message body ...

-------------------------------------
author: Gerrit Johnathan Pham
date: 2015-09-11 23:59:01.000000000

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

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