mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 09:04:41 +04:00
Handle non-ascii filenames from git
This commit is contained in:
parent
8b14c6c5ae
commit
0815108242
4 changed files with 85 additions and 29 deletions
|
|
@ -15,7 +15,6 @@ from pre_commit.commands.install_uninstall import install
|
|||
from pre_commit.commands.run import _compute_cols
|
||||
from pre_commit.commands.run import _get_skips
|
||||
from pre_commit.commands.run import _has_unmerged_paths
|
||||
from pre_commit.commands.run import get_changed_files
|
||||
from pre_commit.commands.run import run
|
||||
from pre_commit.runner import Runner
|
||||
from pre_commit.util import cmd_output
|
||||
|
|
@ -501,18 +500,6 @@ def test_hook_install_failure(mock_out_store_directory, tempdir_factory):
|
|||
assert '☃'.encode('UTF-8') + '²'.encode('latin1') in stdout
|
||||
|
||||
|
||||
def test_get_changed_files():
|
||||
files = get_changed_files(
|
||||
'78c682a1d13ba20e7cb735313b9314a74365cd3a',
|
||||
'3387edbb1288a580b37fe25225aa0b856b18ad1a',
|
||||
)
|
||||
assert files == ['CHANGELOG.md', 'setup.py']
|
||||
|
||||
# files changed in source but not in origin should not be returned
|
||||
files = get_changed_files('HEAD~10', 'HEAD')
|
||||
assert files == []
|
||||
|
||||
|
||||
def test_lots_of_files(mock_out_store_directory, tempdir_factory):
|
||||
# windows xargs seems to have a bug, here's a regression test for
|
||||
# our workaround
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue