mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Implement merge-files only using @bukzor's method.
This commit is contained in:
parent
94d626691f
commit
5810ee4315
5 changed files with 115 additions and 23 deletions
|
|
@ -147,6 +147,8 @@ def clean(runner):
|
|||
def _run_single_hook(runner, repository, hook_id, args, write):
|
||||
if args.all_files:
|
||||
get_filenames = git.get_all_files_matching
|
||||
elif git.is_in_merge_conflict():
|
||||
get_filenames = git.get_conflicted_files_matching
|
||||
else:
|
||||
get_filenames = git.get_staged_files_matching
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue