Remove uneccessarily similar printf() from print_ref_list() in builtin-branch
Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Andy Parkins committed
Nov 2, 2006 at 11:10 UTC
5c1e235f0f2a4586ca46a5503f6283db0ac1b9ac
1 file changed
+5
-3
builtin-branch.c
+5
-3
@@ -103,6 +103,7 @@ static int ref_cmp(const void *r1, const void *r2)
103
static void print_ref_list(int remote_only)
104
{
105
int i;
106
+ char c;
107
108
if (remote_only)
109
for_each_remote_ref(append_ref, NULL);
@@ -112,10 +113,11 @@ static void print_ref_list(int remote_only)
113
qsort(ref_list, ref_index, sizeof(char *), ref_cmp);
114
115
for (i = 0; i < ref_index; i++) {
116
+ c = ' ';
117
if (!strcmp(ref_list[i], head))
116
- printf("* %s\n", ref_list[i]);
117
- else
118
- printf(" %s\n", ref_list[i]);
118
+ c = '*';
119
+
120
+ printf("%c %s\n", c, ref_list[i]);
121
}
122
}
123