Merge pull request #2866 from pre-commit/autoupdate-hack-windows

add partial clone hack to fix autoupdate for windows
This commit is contained in:
Anthony Sottile 2023-05-02 10:05:33 -04:00 committed by GitHub
commit 0fd2501503
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -67,6 +67,8 @@ class RevInfo(NamedTuple):
rev, frozen = exact, rev
try:
# workaround for windows -- see #2865
cmd_output_b(*_git, 'show', f'{rev}:{C.MANIFEST_FILE}')
cmd_output(*_git, 'checkout', rev, '--', C.MANIFEST_FILE)
except CalledProcessError:
pass # this will be caught by manifest validating code