summaryrefslogtreecommitdiffstats
path: root/subcmds/branches.py
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds/branches.py')
-rw-r--r--subcmds/branches.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/subcmds/branches.py b/subcmds/branches.py
index 08c6389c..b7a45b4a 100644
--- a/subcmds/branches.py
+++ b/subcmds/branches.py
@@ -167,7 +167,10 @@ is shown, then the branch appears in all projects.
167 else: 167 else:
168 published = " " 168 published = " "
169 169
170 hdr("%c%c %-*s" % (current, published, width, name)) 170 # A branch name can contain a percent sign, so we need to escape it.
171 # Escape after f-string formatting to properly account for leading
172 # spaces.
173 hdr(f"{current}{published} {name:{width}}".replace("%", "%%"))
171 out.write(" |") 174 out.write(" |")
172 175
173 _RelPath = lambda p: p.RelPath(local=opt.this_manifest_only) 176 _RelPath = lambda p: p.RelPath(local=opt.this_manifest_only)