From 24e296ac270ab146b86ca3e340c5cb05b55b8698 Mon Sep 17 00:00:00 2001 From: irengrig Date: Thu, 20 Dec 2012 18:08:20 +0400 Subject: [PATCH] IDEA-97728 Git branch does not show in commit info --- .../git4idea/src/git4idea/history/wholeTree/DetailsCache.java | 3 ++- plugins/git4idea/src/git4idea/history/wholeTree/GitLogUI.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/git4idea/src/git4idea/history/wholeTree/DetailsCache.java b/plugins/git4idea/src/git4idea/history/wholeTree/DetailsCache.java index 5db4495f81cd..af47ebbbfcdb 100644 --- a/plugins/git4idea/src/git4idea/history/wholeTree/DetailsCache.java +++ b/plugins/git4idea/src/git4idea/history/wholeTree/DetailsCache.java @@ -157,7 +157,8 @@ public class DetailsCache { @Override public void run(@NotNull ProgressIndicator indicator) { if (!recheck.process(abstractHash)) return; - if (getBranches(root, abstractHash) != null) return; + List branches1 = getBranches(root, abstractHash); + if (branches1 != null && ! branches1.isEmpty()) return; List branches; try { branches = new LowLevelAccessImpl(myProject, root).getBranchesWithCommit(abstractHash.getString()); diff --git a/plugins/git4idea/src/git4idea/history/wholeTree/GitLogUI.java b/plugins/git4idea/src/git4idea/history/wholeTree/GitLogUI.java index 6bea70cf82b6..bd2e523d44fd 100644 --- a/plugins/git4idea/src/git4idea/history/wholeTree/GitLogUI.java +++ b/plugins/git4idea/src/git4idea/history/wholeTree/GitLogUI.java @@ -495,7 +495,7 @@ public class GitLogUI implements Disposable { if (commitI == null) return; final VirtualFile root = commitI.selectRepository(myRootsUnderVcs); final List branches = myDetailsCache.getBranches(root, commitI.getHash()); - if (branches != null) { + if (branches != null && ! branches.isEmpty()) { try { myBranchesLoader.take(commitI, branches); }