From 8f232a91739011ec2906a25a583e69f367e0bfe8 Mon Sep 17 00:00:00 2001 From: Julia Beliaeva Date: Thu, 20 Oct 2016 05:10:52 +0300 Subject: [PATCH] [git] more diagnostic for EA-62663 --- plugins/git4idea/src/git4idea/history/GitHistoryUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/git4idea/src/git4idea/history/GitHistoryUtils.java b/plugins/git4idea/src/git4idea/history/GitHistoryUtils.java index b2f721479513..74e7cc0066f5 100644 --- a/plugins/git4idea/src/git4idea/history/GitHistoryUtils.java +++ b/plugins/git4idea/src/git4idea/history/GitHistoryUtils.java @@ -840,7 +840,9 @@ public class GitHistoryUtils { Collection refsInRecord = parseRefs(record.getRefs(), commit.getId(), factory, root); for (VcsRef ref : refsInRecord) { if (!refs.add(ref)) { - LOG.error("Adding duplicate element to the set"); + // relying on the fact that intersection method puts elements of the first argument into the result + VcsRef otherRef = ContainerUtil.getFirstItem(ContainerUtil.intersection(refs, Collections.singleton(ref))); + LOG.error("Adding duplicate element " + ref + " to the set containing " + otherRef); } } return commit;