Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/main/kotlin/app/hashers/CodeLongevity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,10 @@ class CodeLongevity(private val serverRepo: Repo,

getDiffsObservable(tail).blockingSubscribe { (commit, diffs) ->
// A step back in commits history. Update the files map according
// to the diff.
for (diff in diffs) {
// to the diff. Traverse the diffs backwards to handle double
// renames properly.
// TODO(alex): cover file renames by tests (see APP-132 issue).
for (diff in diffs.asReversed()) {
val oldPath = diff.getOldPath()
val oldId = diff.getOldId().toObjectId()
val newPath = diff.getNewPath()
Expand Down