From: Andy Parkins Date: Thu, 2 Nov 2006 11:10:52 +0000 (+0000) Subject: Remove uneccessarily similar printf() from print_ref_list() in builtin-branch X-Git-Tag: v1.4.4-rc1~36 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5c1e235f0f2a4586ca46a5503f6283db0ac1b9ac;p=git.git Remove uneccessarily similar printf() from print_ref_list() in builtin-branch Signed-off-by: Andy Parkins Signed-off-by: Junio C Hamano --- diff --git a/builtin-branch.c b/builtin-branch.c index e028a5390..368b68ec9 100644 --- a/builtin-branch.c +++ b/builtin-branch.c @@ -103,6 +103,7 @@ static int ref_cmp(const void *r1, const void *r2) static void print_ref_list(int remote_only) { int i; + char c; if (remote_only) for_each_remote_ref(append_ref, NULL); @@ -112,10 +113,11 @@ static void print_ref_list(int remote_only) qsort(ref_list, ref_index, sizeof(char *), ref_cmp); for (i = 0; i < ref_index; i++) { + c = ' '; if (!strcmp(ref_list[i], head)) - printf("* %s\n", ref_list[i]); - else - printf(" %s\n", ref_list[i]); + c = '*'; + + printf("%c %s\n", c, ref_list[i]); } }