]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
script/ptl-tool: topological sort ancestors 70795/head
authorPatrick Donnelly <pdonnell@ibm.com>
Mon, 3 Aug 2026 17:47:59 +0000 (13:47 -0400)
committerPatrick Donnelly <pdonnell@ibm.com>
Mon, 3 Aug 2026 17:49:45 +0000 (13:49 -0400)
Otherwise it uses merge commit date which confuses the ordering.

Fixes erroneous audit here: https://github.com/ceph/ceph/pull/70748#pullrequestreview-4828927807

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
src/script/ptl-tool.py

index 689704e133fce193359996cdc779aea5c48815a3..6329f0077b8aa3b16d671e4db9968640cb9616fd 100755 (executable)
@@ -754,8 +754,8 @@ class CommitParityCheck(BaseAuditCheck):
             for commit, orig_sha in bp_cherry_picks:
                 try:
                     # Find merge commit using intersection of ancestry-path and first-parent
-                    log.debug(f"git rev-list --ancestry-path {orig_sha}..{valid_ref}")
-                    ancestry = G.git.rev_list(f"{orig_sha}..{valid_ref}", '--ancestry-path').splitlines()
+                    log.debug(f"git rev-list --ancestry-path --topo-order {orig_sha}..{valid_ref}")
+                    ancestry = G.git.rev_list(f"{orig_sha}..{valid_ref}", '--ancestry-path', '--topo-order').splitlines()
                     log.debug(f"git rev-list --first-parent {orig_sha}..{valid_ref}")
                     first_parent = G.git.rev_list(f"{orig_sha}..{valid_ref}", '--first-parent').splitlines()