Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 81d7efa

Browse files
only consider forward diff in changed files
1 parent 6654fee commit 81d7efa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pre_commit/commands/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def _print_user_skipped(hook, write, args):
5151

5252
def get_changed_files(new, old):
5353
return cmd_output(
54-
'git', 'diff', '--name-only', '{0}..{1}'.format(old, new),
54+
'git', 'diff', '--name-only', '{0}...{1}'.format(old, new),
5555
)[1].splitlines()
5656

5757

0 commit comments

Comments
 (0)