bpo-29798: Handle git worktree in patchcheck (#1058) (#1060) · python/cpython@4c116cb (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit 4c116cb

The original attempted fix missed an `isdir()` call in `get_base_branch()`. (cherry picked from commit 2abfdf5)

File tree

1 file changed

lines changed

1 file changed

lines changed

Lines changed: 1 addition & 1 deletion

Original file line number Diff line number Diff line change
@@ -70,7 +70,7 @@ def get_git_upstream_remote():
70 70 @status("Getting base branch for PR",
71 71 info=lambda x: x if x is not None else "not a PR branch")
72 72 def get_base_branch():
73 -if not os.path.isdir(os.path.join(SRCDIR, '.git')):
73 +if not os.path.exists(os.path.join(SRCDIR, '.git')):
74 74 # Not a git checkout, so there's no base branch
75 75 return None
76 76 version = sys.version_info