提交 8d8325f8 编写于 作者: R René Scharfe 提交者: Junio C Hamano

wt-status: don't skip a magical number of characters blindly

Use the variable branch_name, which already has "refs/heads/" removed,
instead of blindly advancing in the ->branch string by 11 bytes.  This
is safer and less magical.
Signed-off-by: NRene Scharfe <l.s.r@web.de>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 baf0a3e4
......@@ -1533,7 +1533,7 @@ static void wt_shortstatus_print_tracking(struct wt_status *s)
if (starts_with(branch_name, "refs/heads/"))
branch_name += 11;
branch = branch_get(s->branch + 11);
branch = branch_get(branch_name);
color_fprintf(s->fp, branch_color_local, "%s", branch_name);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册