IDEA-101072 (ability to disable expansion hints; asked by xmonad/wmii users)
[vcs] cleanup, notnull

Clean GitMergeProvider from unnecessary javadocs, fix warnings.
Let MergeProvider#isBinary accept @NotNull.
(cherry picked from commit af28b4071490a81ac1565dc7c932e3da6a702d6b)
[git] IDEA-78808 Fix "yours" and "theirs" for manual conflict resolve

* Introduce GitMergeProvider.detect() that checks the state of each
  repository, and fills a map that is further used to check if a
  reverse merge meaning should be used for the given root.

  Keep GitMergeProvider(boolean) that allows to specify the reverse
  setting for all roots at once - for those cases when we know
  whether reverse provider should be used or not (i. e. when an
  action is executed from IDEA).

  Reverse provider is used for rebase and unstash,
  but we can detect only rebase, not stash (IDEA-77051).

* Make GitVcs use detection when asked for the default Merge Provider
  (this actually fixes IDEA-78808, because GitResolveConflictsAction
  uses the default provider).
  Remove unused method and fields.

It is very unlikely that one root would have unresolved conflicts
after a merge, while another would have unresolved conflicts after
rebase, but it is still possible, so we can't just take the first root
with conflicts and treat it as an etalon for reversing the provider.
(cherry picked from commit c3a12efed572249b7c5be7faff773985c7837272)
[git] IDEA-102290 Fix south panel for Untracked files dialog

The bug was caused by the fact that SelectFilesDialog called init()
in its constructor, therefore the descendants were unable to
customize the dialog by passing data via instance fields from the
constructor, because, for example, getSouthPanel() was already called
in super().

To solve this make SelectFilesDialog.init() for those who need just
to use the dialog, and don't call init() from SelectFilesDialog()
for those who need to extend it.
(cherry picked from commit 23c04b3f81b7465d1786c99291c6c8946dfe8cea)
[vcs] IDEA-97913 "Cherry-pick -> Create patch task doesn't end"

The bug was because the CommitResultHandler was called only for the
default commit dialog action (commit), but not for custom executors.

Notify the CommitResultHandler after CommitExecutor completes.
(cherry picked from commit ac487ed43d78fc75e42d9a02c60bd7e1a324a12d)
IDEA-106045 Fix whitespace only difference in diff preview

Use correct comparison policy for diff preview.
Adjust the message shown where there is no differences.

It fixes the assertion, because when there are no diffs,
the arrows to move to next/prev diff are not visible.
(cherry picked from commit f341405c9c1d252b40ec4a61646fd691b41115c4)
[diff] IDEA-106045 Fix whitespace only difference in diff preview

Use correct comparison policy for diff preview.
Adjust the message shown where there is no differences.

It fixes the assertion, because when there are no diffs,
the arrows to move to next/prev diff are not visible.

Add some NotNulls/Nullables.
(cherry picked from commit ec52ef4c70ed8902151edfbbe1e6ba0eaba0e625)
[vcs] IDEA-105707 Update Project Info: fix show diff for Created files

The root cause was that the file type of the Created change was
identified incorrectly as "Modified" and treated further as modified
(and it was not possible to show this modified file without the
"before"-content).

Fix looking for the closest parent GroupTreeNode: when changes are
grouped by folders, the GroupTreeNode is not the first parent,
but the first parent after all directory nodes.
(cherry picked from commit b21c42a80d491e75c5467ea6d99d3207ca532f63)
[git] GitMergeProvider: use Set instead of Map<..., Boolean>

Also solves a potential NPE in checking myReverseMap.get(root).
Relates to the fix for IDEA-78808
(cherry picked from commit f4e8b5008069bc246eab22c8a2aa86236f8cb618)
[git] GitMergeProvider: make code more clear

Use a enum for 3-positional reverse state instead of nullable Boolean.

Relates to the fix for IDEA-78808
(cherry picked from commit fb06cf95c985875930f380454eb7dba33b9edcba)