changeset 35689:5fe6f946f111

log: allow matchfn to be non-null even if both --patch/--stat are off This makes the next patch slightly simpler.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 04 Jan 2018 15:20:46 +0900
parents 84d0e99c063a
children 3e394e0558d7
files mercurial/cmdutil.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Thu Jan 04 14:37:15 2018 +0900
+++ b/mercurial/cmdutil.py	Thu Jan 04 15:20:46 2018 +0900
@@ -1725,7 +1725,8 @@
                 diffordiffstat(self.ui, self.repo, diffopts, prev, node,
                                match=matchfn, stat=False,
                                hunksfilterfn=hunksfilterfn)
-            self.ui.write("\n")
+            if stat or diff:
+                self.ui.write("\n")
 
 class jsonchangeset(changeset_printer):
     '''format changeset information.'''