git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH 1/4] Remove uneccessarily similar printf() from print_ref_list()
Date: Thu, 2 Nov 2006 11:10:52 +0000	[thread overview]
Message-ID: <200611021110.52952.andyparkins@gmail.com> (raw)

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
---
 builtin-branch.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/builtin-branch.c b/builtin-branch.c
index e028a53..368b68e 100644
--- a/builtin-branch.c
+++ b/builtin-branch.c
@@ -103,6 +103,7 @@ static int ref_cmp(const void *r1, const
 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_on
 	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]);
 	}
 }
 
-- 
1.4.3.2


                 reply	other threads:[~2006-11-02 11:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200611021110.52952.andyparkins@gmail.com \
    --to=andyparkins@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).