Skip to content

Commit

Permalink
Merge pull request #2866 from pre-commit/autoupdate-hack-windows
Browse files Browse the repository at this point in the history
add partial clone hack to fix autoupdate for windows
  • Loading branch information
asottile committed May 2, 2023
2 parents 4c06239 + 420a15f commit 0fd2501
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pre_commit/commands/autoupdate.py
Expand Up @@ -67,6 +67,8 @@ def update(self, tags_only: bool, freeze: bool) -> RevInfo:
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
Expand Down

0 comments on commit 0fd2501

Please sign in to comment.