Kaydet (Commit) ee10fb9c authored tarafından Nick Coghlan's avatar Nick Coghlan Kaydeden (comit) GitHub

bpo-29798: Handle git worktree in `make patchcheck` (#629) (#635)

In git worktree directories, `.git` is a configuration
file rather than a subdirectory
(cherry picked from commit 6a6d0906)
üst c8869af8
......@@ -105,7 +105,10 @@ def changed_files(base_branch=None):
return [x.decode().rstrip() for x in st.stdout]
finally:
st.stdout.close()
elif os.path.isdir(os.path.join(SRCDIR, '.git')):
elif os.path.exists(os.path.join(SRCDIR, '.git')):
# We just use an existence check here as:
# directory = normal git checkout/clone
# file = git worktree directory
if base_branch:
cmd = 'git diff --name-status ' + base_branch
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment