mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Run git diff with --no-ext-diff
This commit is contained in:
parent
844c839067
commit
321210d332
3 changed files with 19 additions and 10 deletions
|
|
@ -68,7 +68,8 @@ def get_conflicted_files():
|
|||
# this will also include the conflicted files
|
||||
tree_hash = cmd_output('git', 'write-tree')[1].strip()
|
||||
merge_diff_filenames = cmd_output(
|
||||
'git', 'diff', '-m', tree_hash, 'HEAD', 'MERGE_HEAD', '--name-only',
|
||||
'git', 'diff', '--no-ext-diff',
|
||||
'-m', tree_hash, 'HEAD', 'MERGE_HEAD', '--name-only',
|
||||
)[1].splitlines()
|
||||
return set(merge_conflict_filenames) | set(merge_diff_filenames)
|
||||
|
||||
|
|
@ -76,7 +77,7 @@ def get_conflicted_files():
|
|||
@memoize_by_cwd
|
||||
def get_staged_files():
|
||||
return cmd_output(
|
||||
'git', 'diff', '--staged', '--name-only',
|
||||
'git', 'diff', '--staged', '--name-only', '--no-ext-diff',
|
||||
# Everything except for D
|
||||
'--diff-filter=ACMRTUXB'
|
||||
)[1].splitlines()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue