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: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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);