From 8d8325f8ee3ef187a22743ccbedb978e52e3d095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Sat, 31 Oct 2015 18:37:12 +0100 Subject: 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: Rene Scharfe Signed-off-by: Junio C Hamano --- wt-status.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wt-status.c') diff --git a/wt-status.c b/wt-status.c index 0e4a04e69..ca6811118 100644 --- a/wt-status.c +++ b/wt-status.c @@ -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); -- cgit v1.2.1