Skip to content

Commit

Permalink
Remove uneccessarily similar printf() from print_ref_list() in builti…
Browse files Browse the repository at this point in the history
…n-branch

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Andy Parkins authored and Junio C Hamano committed Nov 3, 2006
1 parent 7854e52 commit 5c1e235
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions builtin-branch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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]);
}
}

Expand Down

0 comments on commit 5c1e235

Please sign in to comment.