# HG changeset patch # User Marcin Kuzminski # Date 2019-07-25 20:03:12 # Node ID f6977cf33de76fedad1758d434af7d93d5940e2a # Parent 5fc270438d82a20a4b2452bd80c66e0098a28fd6 git: use diff with long flag names for better readability. diff --git a/vcsserver/git.py b/vcsserver/git.py --- a/vcsserver/git.py +++ b/vcsserver/git.py @@ -930,11 +930,11 @@ class GitRemote(RemoteBase): def diff(self, wire, commit_id_1, commit_id_2, file_filter, opt_ignorews, context): flags = [ - '-U%s' % context, '--full-index', '--binary', '-p', - '-M', '--abbrev=40'] + '-U%s' % context, '--full-index', '--binary', '--patch', + '--find-renames', '--abbrev=40'] if opt_ignorews: - flags.append('-w') + flags.append('--ignore-all-space') if commit_id_1 == self.EMPTY_COMMIT: cmd = ['show'] + flags + [commit_id_2] @@ -956,6 +956,7 @@ class GitRemote(RemoteBase): x += 1 # Append new line just like 'diff' command do diff = '\n'.join(lines[x:]) + '\n' + return diff @reraise_safe_exceptions