Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4c116cb

Browse files
authored
bpo-29798: Handle git worktree in patchcheck (#1058) (#1060)
The original attempted fix missed an `isdir()` call in `get_base_branch()`. (cherry picked from commit 2abfdf5)
1 parent af685f9 commit 4c116cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Tools/scripts/patchcheck.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def get_git_upstream_remote():
7070
@status("Getting base branch for PR",
7171
info=lambda x: x if x is not None else "not a PR branch")
7272
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')):
7474
# Not a git checkout, so there's no base branch
7575
return None
7676
version = sys.version_info

0 commit comments

Comments
 (0)