bpo-29798: Handle git worktree in patchcheck · python/cpython@c82d394 (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit c82d394
bpo-29798: Handle git worktree in patchcheck
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 |