Fix GitConfigTest: use PlatformFacade to get plugin.
(cherry-picked from d8c4ce1)
IDEA-83764 Support git-svn in GitConfig

Use special GitRemote instance for "remote = . " typical for git-svn branch in .git/config.
Filter out the "refs/remotes/" prefix (as it is done for refs/heads) when creating GitBranch in GitBranch#tracked
Add a test with test data from the bugreport.
(cherry picked from commit 384c4d2e5d5cf346c45316e154c97bb6263ea0f6)
IDEA-60725 Fix AE when creating a new local branch from a git-svn branch

1. Don't assert that a remote branch should necessarily have a slash separator: git-svn branches don't have it.
2. Don't warn that a branch name clashes with a remote branch name, if it is a git-svn remote branch.
    The logic of the guess is not perfect: there can be a git-svn branch configuration that will still produce the error message in the dialog and prevent branch creation. But there is no better way to identify it, and the probability is very low anyway.
3. Better displaying of tracking git-svn branch in the GitBranchPopup: don't show "./" in the beginning of the tracked branch.
(cherry-picked from 5160362)
GitFileUtils#add(VirtualFile...) and (FilePath...): DRY

* Move updating the UntrackedFilesHolder to a separate method.
* Safe (with nullity check) convert from FilePath to VirtualFile when needed.
* @Nullable, @NotNull
* Update javadocs.
(cherry-picked from a9669da)
IDEA-84745 Don't add ignored files to Git.

* Given a number of paths to add to Git, check if there are any among them which are ignored, and exclude them from the list.
   Check for ignorance via 'git ls-files -io --exclude-standard'.
* Additionally call 'git add' with '--ignore-errors' to skip files failed by other reason
   (the flag doesn't affect failures because of ignorance).
(cherry-picked from 045345f)
Github: better check if parent remote of a fork is defined

Before the change, when using github account "foobar", forking from "foo" resulted in incorrect fork parent remote identification.
(cherry-picked from 6315d96)
IDEA-85310 Better handle HTTP urls without .git at the end

JGit can throw not only JGitInternalException,
but InvalidRemoteException as well.
(cherry-picked from e790f42)
IDEA-85310 Better error notification for http

* Log exception as error, not as info.
* Display the error stored in GitFetchResult.
(cherry-picked from 0f537c0)
IDEA-85138  GitHub Rebase my Github fork: fetch the upstream before rebase

* Create GitFetcher#fetch(root, remote) to fetch the given remote instead of the current remote.
* Call it from GithubRebaseAction, display error and don't proceed in the case of error.
(cherry-picked from 356c720)
IDEA-85139 GitHub "Rebase my Github fork" dialog should have "Interactive" deselected by default
(cherry-picked from a16105c)
IDEA-55671 Git rebase nearly always reports an error

* Make success to be the default status.
* Add better diagnosis for conflict and error.
(cherry-picked from 5a37d38)
IDEA-76340 Refresh after Git stash/unstash
(cherry-picked from 942c9fd)
GitUtil.findGitDir: find better, expecting a relative path to submodule's git dir.

Might be related to IDEA-85369.
(cherry-picked from f37d572)
IDEA-85121 SIOOBE when showing Git branches for git-svn

Just return the whole branch name as the remote name in this case.
(cherry-picked from 3233555)
IDEA-85015 More diagnostics.

Print the root, try to invoke git log -1 HEAD and check the result.
(cherry-picked from b56a75e)
IDEA-85380 Show diff on a conflicted file under Git throws NPE

* GitMergeProvider, identifying the LAST_REVISION_NUMBER:
   - if there is no MERGE_HEAD, try the CHERRY_PICK_HEAD.
   - log the error if none can be resolved (and if HEAD can't be resolved in the case of rebase).
* Protect against the NPE in ConflictedDiffRequestPresentable.
(cherry-picked from 88e9045)
GitFileUtils#add use Set instead of List for faster contains() check.

[reviewed by irengrig]
(cherry-picked from 93b0c25)
IDEA-85310  GitHttpAdapter: remove "throw" occasionally left while debugging.

[reviewed by irengrig]
(cherry-picked from 72a59fc)
Copy FileUtil.join(String...) from master, because it is used by the cherry-picked code.