Make cwd optional for scm.IsAncestor()
Bug:b/265929888
Change-Id: I9f25cd26eaf2d708ce3ac7d86503bb2c295c8406
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4178351
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
diff --git a/git_cl.py b/git_cl.py
index c6a9bb3..b1eafde 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -4668,12 +4668,12 @@
# Case 4: If upstream's last_upload < cl.base_commit we are
# uploading cl and upstream_cl.
# Continue up the tree to check other branch relations.
- if scm.GIT.IsAncestor(None, upstream_last_upload, base_commit):
+ if scm.GIT.IsAncestor(upstream_last_upload, base_commit):
continue
# Case 5: If cl.base_commit < upstream's last_upload the user
# must rebase before uploading.
- if scm.GIT.IsAncestor(None, base_commit, upstream_last_upload):
+ if scm.GIT.IsAncestor(base_commit, upstream_last_upload):
DieWithError(
'At least one branch in the stack has diverged from its upstream '
'branch and does not contain its upstream\'s last upload.\n'