void (@NotNull String hash, @NotNull List<R> records) { // there is a surprising (or not really surprising, depending how to look at it) problem with `-m` option // despite what is written in git-log documentation, it does not always output a record for each parent of a merge commit // if a merge commit has no changes with one of the parents, nothing is output for that parent // there is no way of knowing which parent it is just from git-log output // if we did not use custom pretty format, line `from <hash>` would appear in the record header // but we use, so there is no hash in the record header // and there is no format option to display it // so the solution is to run another git log command and get tree hashes for all participating commits // tree hashes allow to determine, which parent of the commit in question is the same as the commit itself and create an empty record for it MultiMap<String, R> incompleteRecords = MultiMap.create(); incompleteRecords.put(hash, records); try { processIncompleteRecords(incompleteRecords, myProject, myRoot, myConsumer); } catch (VcsException e) { LOG.error(e); } }