From fc75e73c74eff561c16c4beff0d7797d1cac4039 Mon Sep 17 00:00:00 2001 From: Julia Beliaeva Date: Mon, 13 Feb 2017 19:02:55 +0300 Subject: [PATCH] [vcs-log] when there are commits with both \u0001 and \u0003 symbols, try no to fail completely, but rather return commits that were loaded IDEA-156249 --- .../git4idea/src/git4idea/history/GitHistoryUtils.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/git4idea/src/git4idea/history/GitHistoryUtils.java b/plugins/git4idea/src/git4idea/history/GitHistoryUtils.java index 5c1ad585cb5a..f1317fa06d20 100644 --- a/plugins/git4idea/src/git4idea/history/GitHistoryUtils.java +++ b/plugins/git4idea/src/git4idea/history/GitHistoryUtils.java @@ -835,7 +835,15 @@ public class GitHistoryUtils { List commits = ContainerUtil.newArrayList(); - loadDetails(project, root, withRefs, withChanges, record -> commits.add(converter.fun(record)), parameters); + try { + loadDetails(project, root, withRefs, withChanges, record -> commits.add(converter.fun(record)), parameters); + } + catch (VcsException e) { + if (commits.isEmpty()) { + throw e; + } + LOG.warn("Error during loading details, returning partially loaded commits\n", e); + } return commits; }