Allow empty commit in the case of a merge commit

It sometimes happens that a resolved merge is the same as HEAD, in which
case no files are staged for commit.

Before this change, the user was stuck in this state as the staging view
and commit dialog both refused to do a commit without staged files.

With this change, an empty commit is now allowed when the repository
state is MERGING_RESOLVED.

Bug: 385924
Change-Id: I6b9f5a91807726e24b5f1f9a5e8f841ed60e9f9c
Signed-off-by: Robin Stocker <robin@nibor.org>
Containers with deleted files should be decorated as dirty

Bug: 329655
Change-Id: I140af16ab2fc73e9c5754e6de987d74f98a04463
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Provide history selection to workbench page.

Enable users to contribute actions (objectContributions) to the 
commits shown in the GitHistoryPage.

Bug: 386151
Change-Id: Id77eca75ce20eba883ce932fbc797b9c258c3041
Merge "Allow empty commit in the case of a merge commit"
Optimize GitScopeOperation with shorter and faster code.

Shortened and made code faster by removing the use of |= because it's
not lazy as the || operator.

Change-Id: If3fb180a170a8e8e0585484024569b5ef8705427
Signed-off-by: François Rey <eclipse.org@francois.rey.name>
Merge "Optimize GitScopeOperation with shorter and faster code."
[historyView] Fix NPE in GitCompareEditorInput#equals

The repository field may be null when a GitCompareEditorInput was
constructed with the IResource constructor but prepareInput was not yet
called.

The NPE could be observed like this:

1. Select two commits in the History view
2. Run Compare with Each Other
3. Do step 2 again

Bug: 349418
Change-Id: Iac868ed2b628e4fb0fda5a2fa161d89a333eb0a8
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Avoid retrieving project-only info when decorating non-projects

Some of this information is very expensive and not available for
non-projects 

Change-Id: I84da6285891e233f02276d75d16b84e4a3a26380
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
[stagingView] Allow to commit using Ctrl+Enter (Cmd+Enter)

Otherwise mousing to the small toolbar icon is always needed.

The shortcut is Mod1+Enter, so it's Ctrl+Enter on Linux and Windows, and
Cmd+Enter on OS X, matching other applications providing this shortcut.

The shortcut is shared with CommitDialog, which ensures consistency.

To make it discoverable, it's shown in the tooltip of the toolbar
action.

Bug: 382936
Change-Id: I24f313543c1bd27c8985b332b2c6d07b20ed5733
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Added missing single quote

Change-Id: I989c2a602422c44b6f18644f272a474e0a9d5062
Signed-off-by: Dani Megert <Daniel_Megert@ch.ibm.com>
Remove superfluous "Do you want to continue" in repository delete

Two similar strings are needed in slightly different contexts.
Duplicate and remove the question for the DeleteRepositoryDialog.

Change-Id: I5858368a666649715b5390410046ce5d1090b77c
Signed-off-by: Robin Stocker <robin@nibor.org>
Commit should only prompt if unsaved files are from repo

Before, it would always prompt, even if the unsaved files belonged to
another repository.

Due to SaveFilter not being API, we copied the whole class until we can
depend on the one from Platform UI, see bug 386609.

Bug: 376700
Change-Id: I8a29e5121524f9610a3c05d613780d864f0aa0a6
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Dani Megert <Daniel_Megert@ch.ibm.com>
[stagingView] Prompt if there are unsaved files on commit

This should make the user aware if saving a file was forgotten.

Note that when the user chooses to save the editors in the dialog, the
commit will not include the changes as they were not staged.

Bug: 385472
Change-Id: I9de82fb948234c523ade9da751c08fc5f8fca712
Signed-off-by: Robin Stocker <robin@nibor.org>