From e5f5f440fe0027a964b9eb25c08cf6d28bbdf27c Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Fri, 3 Oct 2014 15:37:36 +0400 Subject: [PATCH] [git] Guess Git root a little better. --- plugins/git4idea/src/git4idea/branch/GitBranchUtil.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/git4idea/src/git4idea/branch/GitBranchUtil.java b/plugins/git4idea/src/git4idea/branch/GitBranchUtil.java index 2504c345b559..adc2f97ade50 100644 --- a/plugins/git4idea/src/git4idea/branch/GitBranchUtil.java +++ b/plugins/git4idea/src/git4idea/branch/GitBranchUtil.java @@ -510,6 +510,10 @@ public class GitBranchUtil { rootCandidate = root; } } + LOG.debug("The best candidate: " + rootCandidate); + if (rootCandidate == null) { + rootCandidate = gitRoots[0]; + } LOG.debug("Returning the best candidate: " + rootCandidate); return rootCandidate; }