filemerge: remove unnecessary check for empty string
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 20 Jan 2022 14:46:16 -0800
changeset 48576 1a84758b4fca
parent 48575 c852950f0e72
child 48577 62682662346c
filemerge: remove unnecessary check for empty string Looking at the statement just before, the string is clearly never empty (or otherwise falsy). Differential Revision: https://phab.mercurial-scm.org/D12011
mercurial/filemerge.py
--- a/mercurial/filemerge.py	Thu Jan 20 23:07:35 2022 -0800
+++ b/mercurial/filemerge.py	Thu Jan 20 14:46:16 2022 -0800
@@ -837,9 +837,7 @@
 
     label = (b'%s:' % label).ljust(pad + 1)
     mark = b'%s %s' % (label, templateresult)
-
-    if mark:
-        mark = mark.splitlines()[0]  # split for safety
+    mark = mark.splitlines()[0]  # split for safety
 
     # 8 for the prefix of conflict marker lines (e.g. '<<<<<<< ')
     return stringutil.ellipsis(mark, 80 - 8)