changeset 48601:1a84758b4fca

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
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 20 Jan 2022 14:46:16 -0800
parents c852950f0e72
children 62682662346c
files mercurial/filemerge.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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)