Issue #29798: Handle git worktree in patchcheck (#1057)

The original attempted fix missed an `isdir()` call in
`get_base_branch()`.
1 file changed