# HG changeset patch # User Marcin Kuzminski # Date 2019-07-29 15:20:33 # Node ID 42afb6337759f85a6c482ffbf30009e4ea311ab7 # Parent c5e7292acdc3326fcb1490cccde0c5430b19dd10 git: ensure empty diff is returned for no matching file filter diff --git a/vcsserver/git.py b/vcsserver/git.py --- a/vcsserver/git.py +++ b/vcsserver/git.py @@ -996,6 +996,8 @@ class GitRemote(RemoteBase): for p in diff_obj: if p.delta.old_file.path == file_filter: return p.patch or '' + # fo matching path == no diff + return '' return diff_obj.patch or '' @reraise_safe_exceptions