From 81d7efa7bb72aaea2a8bf7ee1e7c4609f0672ee9 Mon Sep 17 00:00:00 2001 From: vinay karanam Date: Wed, 25 May 2016 14:44:59 +0530 Subject: [PATCH] only consider forward diff in changed files --- pre_commit/commands/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pre_commit/commands/run.py b/pre_commit/commands/run.py index 9c219008..424e2958 100644 --- a/pre_commit/commands/run.py +++ b/pre_commit/commands/run.py @@ -51,7 +51,7 @@ def _print_user_skipped(hook, write, args): def get_changed_files(new, old): return cmd_output( - 'git', 'diff', '--name-only', '{0}..{1}'.format(old, new), + 'git', 'diff', '--name-only', '{0}...{1}'.format(old, new), )[1].splitlines()