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;