Skip to content

Commit 3db3b95

Browse files
author
Stephan Dilly
committed
fix order of old/new in compare
1 parent 5672cfd commit 3db3b95

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/components/commit_details/compare_details.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,15 @@ impl CompareDetailsComponent {
5252
let c1 = sync::get_commit_details(CWD, ids.0).ok();
5353
let c2 = sync::get_commit_details(CWD, ids.1).ok();
5454

55-
c1.and_then(|c1| c2.map(|c2| (c1, c2)))
55+
c1.and_then(|c1| {
56+
c2.map(|c2| {
57+
if c1.author.time < c2.author.time {
58+
(c1, c2)
59+
} else {
60+
(c2, c1)
61+
}
62+
})
63+
})
5664
});
5765
}
5866

0 commit comments

Comments
 (0)