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 6a6d090612dd7deaac2bc0399fad743e5e2db606)
1 file changed