mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
allow pre-commit run --files ... against unmerged files
This commit is contained in:
parent
6740a1795c
commit
2405caa352
2 changed files with 8 additions and 1 deletions
|
|
@ -536,6 +536,13 @@ def test_merge_conflict(cap_out, store, in_merge_conflict):
|
|||
assert b'Unmerged files. Resolve before committing.' in printed
|
||||
|
||||
|
||||
def test_files_during_merge_conflict(cap_out, store, in_merge_conflict):
|
||||
opts = run_opts(files=['placeholder'])
|
||||
ret, printed = _do_run(cap_out, store, in_merge_conflict, opts)
|
||||
assert ret == 0
|
||||
assert b'Bash hook' in printed
|
||||
|
||||
|
||||
def test_merge_conflict_modified(cap_out, store, in_merge_conflict):
|
||||
# Touch another file so we have unstaged non-conflicting things
|
||||
assert os.path.exists('placeholder')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue