log: allow matchfn to be non-null even if both --patch/--stat are off
authorYuya Nishihara <yuya@tcha.org>
Thu, 04 Jan 2018 15:20:46 +0900
changeset 35689 5fe6f946f111
parent 35688 84d0e99c063a
child 35690 3e394e0558d7
log: allow matchfn to be non-null even if both --patch/--stat are off This makes the next patch slightly simpler.
mercurial/cmdutil.py
--- 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.'''