# HG changeset patch # User Martin von Zweigbergk # Date 1648166109 25200 # Node ID 7bdf19f892c6018c68c6e7f500662b75fb6c6b58 # Parent e160f073c37bf7dc31118429a6b8c9940dea3929 histedit: remove an unnecessary default value of `b''` for commit message I don't think `ctx.description()` is ever anything falsy other than `b''`. I think the comment added in 4c4232e51167 (histedit: extract common summary code into method, 2016-05-27) is mistaken (I don't see any code following that pattern before the function was added). Differential Revision: https://phab.mercurial-scm.org/D12406 diff -r e160f073c37b -r 7bdf19f892c6 hgext/histedit.py --- a/hgext/histedit.py Thu Mar 24 16:51:20 2022 -0700 +++ b/hgext/histedit.py Thu Mar 24 16:55:09 2022 -0700 @@ -2319,10 +2319,7 @@ def _getsummary(ctx): - # a common pattern is to extract the summary but default to the empty - # string - summary = ctx.description() or b'' - return stringutil.firstline(summary) + return stringutil.firstline(ctx.description()) def bootstrapcontinue(ui, state, opts):