logcmdutil: use new function for getting first line of string
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 24 Mar 2022 22:05:49 -0700
changeset 49029 eb8aed493a56
parent 49028 db93041e5b1c
child 49030 75794847ef62
logcmdutil: use new function for getting first line of string Differential Revision: https://phab.mercurial-scm.org/D12412
mercurial/logcmdutil.py
--- a/mercurial/logcmdutil.py	Thu Mar 24 22:05:36 2022 -0700
+++ b/mercurial/logcmdutil.py	Thu Mar 24 22:05:49 2022 -0700
@@ -416,7 +416,7 @@
                 self.ui.write(b"\n\n")
             else:
                 self.ui.write(
-                    columns[b'summary'] % description.splitlines()[0],
+                    columns[b'summary'] % stringutil.firstline(description),
                     label=b'log.summary',
                 )
         self.ui.write(b"\n")