bisect-kit: fix git_util.get_history_recursively commit ordering
Recent chromeos manifest has two commits (2f3b0e and 80e233) with
identical commit time, which cause setup_cros_bisect.py confused and
failed to sync deleted repo. Commits sorting should not tie-break by
commit id when their commit time equals.
BUG=None
TEST=unittest
Change-Id: Ica123b19e827b1ac5ff01006a952917219b0d2dd
Reviewed-on: https://chromium-review.googlesource.com/1354839
Commit-Ready: Kuang-che Wu <kcwu@chromium.org>
Tested-by: Kuang-che Wu <kcwu@chromium.org>
Reviewed-by: Chung-yih Wang <cywang@chromium.org>
diff --git a/bisect_kit/git_util.py b/bisect_kit/git_util.py
index fb3c84c..002220b 100644
--- a/bisect_kit/git_util.py
+++ b/bisect_kit/git_util.py
@@ -463,7 +463,7 @@
# Sort and dedup.
result2 = []
- for x in sorted(result):
+ for x in sorted(result, key=lambda x: x[0]):
if result2 and result2[-1] == x:
continue
result2.append(x)