mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Add hashes filtering by the roots
There may be commits from different repositories but these commits can contain the same file. And git log will throw a bad object error
This commit is contained in:
+2
-1
@@ -20,7 +20,8 @@ internal class FilesHistoryProvider(private val project: Project, private val ro
|
||||
private fun getCommitsData(commits: Collection<Int>): Map<Int, Commit> {
|
||||
val hashes = mutableMapOf<String, Int>()
|
||||
for (commit in commits) {
|
||||
val hash = dataGetter.logStorage.getCommitId(commit)?.hash?.asString() ?: continue
|
||||
val commitId = dataGetter.logStorage.getCommitId(commit) ?: continue
|
||||
val hash = commitId.takeIf { commitId.root == root }?.hash?.asString() ?: continue
|
||||
hashes[hash] = commit
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user