From 09c529d0c4561dc985bc97f1392ba2b746c4aadc Mon Sep 17 00:00:00 2001 From: Denis Zaichenko Date: Thu, 27 Jun 2024 12:14:20 +0200 Subject: [PATCH] [vcs][log] Fixed rename detection for file history. Avoid stopping the traversal of renames when one branch returns no commits. GitOrigin-RevId: 20ac1952ca9c4f3d8f1157db1bbe736b64e50142 --- plugins/git4idea/src/git4idea/history/GitFileHistory.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git4idea/src/git4idea/history/GitFileHistory.kt b/plugins/git4idea/src/git4idea/history/GitFileHistory.kt index 4e7c22734f4d..78ae7b5dafc1 100644 --- a/plugins/git4idea/src/git4idea/history/GitFileHistory.kt +++ b/plugins/git4idea/src/git4idea/history/GitFileHistory.kt @@ -75,7 +75,7 @@ class GitFileHistory internal constructor(private val project: Project, while (starts.isNotEmpty()) { val (startRevisions, startPath) = starts.removeFirst() val lastCommits = runGitLog(logParser, startPath, visitedCommits, consumer, startRevisions + parameters.toList()) - if (lastCommits.isEmpty()) return + if (lastCommits.isEmpty()) continue for (lastCommit in lastCommits) { val parents = getParentsAndPathsIfRename(lastCommit, startPath)