Skip to content

Commit

Permalink
Merge pull request #927 from pre-commit/py38-shlex-join
Browse files Browse the repository at this point in the history
shlex.join is always available in 3.8+
  • Loading branch information
asottile authored Jul 1, 2023
2 parents aa54f0d + e432efb commit 950e806
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pre_commit_hooks/destroyed_symlinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,7 @@ def main(argv: Sequence[str] | None = None) -> int:
for destroyed_link in destroyed_links:
print(f'- {destroyed_link}')
print('You should unstage affected files:')
print(
'\tgit reset HEAD -- {}'.format(
' '.join(shlex.quote(link) for link in destroyed_links),
),
)
print(f'\tgit reset HEAD -- {shlex.join(destroyed_links)}')
print(
'And retry commit. As a long term solution '
'you may try to explicitly tell git that your '
Expand Down

0 comments on commit 950e806

Please sign in to comment.