From 503eccba1d2cb7a980467e15f71a6cee6ed35223 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Sat, 13 Jun 2020 21:21:44 +0200 Subject: [PATCH 1/1] index: fix bytes vs. str (py3) for --long output Signed-off-by: Johannes Berg Reviewed-by: Rob Browning --- lib/cmd/index-cmd.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cmd/index-cmd.py b/lib/cmd/index-cmd.py index a479ca9..fbaa029 100755 --- a/lib/cmd/index-cmd.py +++ b/lib/cmd/index-cmd.py @@ -319,7 +319,8 @@ if opt['print'] or opt.status or opt.modified: if opt.hash: line += hexlify(ent.sha) + b' ' if opt.long: - line += b'%7s %7s ' % (oct(ent.mode), oct(ent.gitmode)) + line += b'%7s %7s ' % (oct(ent.mode).encode('ascii'), + oct(ent.gitmode).encode('ascii')) out.write(line + (name or b'./') + b'\n') if opt.check and (opt['print'] or opt.status or opt.modified or opt.update): -- 2.39.2