From 2e80d4458df659765011450621ee34459dc749f9 Mon Sep 17 00:00:00 2001 From: Pranit Bauva Date: Tue, 14 Feb 2017 23:53:36 +0530 Subject: [PATCH] !squash: show-branch: use skip_prefix to drop magic numbers Signed-off-by: Pranit Bauva --- builtin/show-branch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/builtin/show-branch.c b/builtin/show-branch.c index c03d3ec7c..19756595d 100644 --- a/builtin/show-branch.c +++ b/builtin/show-branch.c @@ -275,8 +275,7 @@ static void show_one_commit(struct commit *commit, int no_name) pp_commit_easy(CMIT_FMT_ONELINE, commit, &pretty); pretty_str = pretty.buf; } - if (starts_with(pretty_str, "[PATCH] ")) - pretty_str += 8; + skip_prefix(pretty_str, "[PATCH] ", &pretty_str); if (!no_name) { if (name && name->head_name) { -- 2.11.0