Skip to content

Commit 38f2c5b

Browse files
committed
adds the 'reverse' option to all diff commands
1 parent 07201e2 commit 38f2c5b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

file_diffs.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ def prep_content(self, ab, file_name, default_name):
8888
def run_diff(self, a, b, from_file, to_file, **options):
8989
external_diff_tool = options.get('cmd')
9090

91+
if options.get('reverse'):
92+
from_file, to_file = to_file, from_file
93+
a, b = b, a
94+
9195
(from_content, from_file) = self.prep_content(a, from_file, 'from_file')
9296
(to_content, to_file) = self.prep_content(b, to_file, 'to_file')
9397

0 commit comments

Comments
 (0)