All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jay Soffian <jaysoffian@gmail.com>
To: git@vger.kernel.org
Cc: Jay Soffian <jaysoffian@gmail.com>,
	Marc Branchaud <marcnarc@xiplink.com>,
	Junio C Hamano <gitster@pobox.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Johannes Sixt <j.sixt@viscovery.net>
Subject: [PATCH 2/4] remote: move append_ref_to_tracked_list to get rid of prototype
Date: Thu, 19 Feb 2009 00:14:29 -0500	[thread overview]
Message-ID: <1235020471-59982-3-git-send-email-jaysoffian@gmail.com> (raw)
In-Reply-To: <1235020471-59982-2-git-send-email-jaysoffian@gmail.com>

Relocate the append_ref_to_tracked_list() function above all its callers
so that we can get rid of the prototype.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
---
Doing this as a separate patch makes the prior patch easier to review,
but I think it could be squashed when you apply the series.

 builtin-remote.c |   37 +++++++++++++++++--------------------
 1 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/builtin-remote.c b/builtin-remote.c
index ea5e808..b61f754 100644
--- a/builtin-remote.c
+++ b/builtin-remote.c
@@ -23,9 +23,6 @@ static int verbose;
 
 static int show_all(void);
 
-static int append_ref_to_tracked_list(const char *refname,
-	const unsigned char *sha1, int flags, void *cb_data);
-
 static inline int postfixcmp(const char *string, const char *postfix)
 {
 	int len1 = strlen(string), len2 = strlen(postfix);
@@ -659,6 +656,23 @@ static void free_remote_ref_states(struct ref_states *states)
 	string_list_clear(&states->heads, 0);
 }
 
+static int append_ref_to_tracked_list(const char *refname,
+	const unsigned char *sha1, int flags, void *cb_data)
+{
+	struct ref_states *states = cb_data;
+	struct refspec refspec;
+
+	if (flags & REF_ISSYMREF)
+		return 0;
+
+	memset(&refspec, 0, sizeof(refspec));
+	refspec.dst = (char *)refname;
+	if (!remote_find_tracking(states->remote, &refspec))
+		string_list_append(abbrev_branch(refspec.src), &states->tracked);
+
+	return 0;
+}
+
 static int get_remote_ref_states(const char *name,
 				 struct ref_states *states,
 				 int query)
@@ -688,23 +702,6 @@ static int get_remote_ref_states(const char *name,
 	return 0;
 }
 
-static int append_ref_to_tracked_list(const char *refname,
-	const unsigned char *sha1, int flags, void *cb_data)
-{
-	struct ref_states *states = cb_data;
-	struct refspec refspec;
-
-	if (flags & REF_ISSYMREF)
-		return 0;
-
-	memset(&refspec, 0, sizeof(refspec));
-	refspec.dst = (char *)refname;
-	if (!remote_find_tracking(states->remote, &refspec))
-		string_list_append(abbrev_branch(refspec.src), &states->tracked);
-
-	return 0;
-}
-
 static int show(int argc, const char **argv)
 {
 	int no_query = 0, result = 0;
-- 
1.6.2.rc1.218.g1b4fab

  reply	other threads:[~2009-02-19  5:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-19  5:14 [PATCH 0/4] Improve "remote show" output Jay Soffian
2009-02-19  5:14 ` [PATCH 1/4] remote: minor code cleanups in preparation for changing "show" output Jay Soffian
2009-02-19  5:14   ` Jay Soffian [this message]
2009-02-19  5:14     ` [PATCH 3/4] string-list: add for_each_string_list() Jay Soffian
2009-02-19  5:14       ` [PATCH 4/4] remote: new show output style Jay Soffian
2009-02-19 16:03         ` Marc Branchaud
2009-02-19 16:16           ` Sverre Rabbelier
2009-02-19 16:31             ` Marc Branchaud
2009-02-19 16:33               ` Sverre Rabbelier
2009-02-19 16:17           ` Rostislav Svoboda
2009-02-19 17:57           ` Jay Soffian
2009-02-19 17:59             ` Jay Soffian
2009-02-19 18:58             ` Julian Phillips
2009-02-20 22:34             ` Marc Branchaud
2009-02-20 22:55               ` Jay Soffian
2009-02-19 19:29         ` Johannes Sixt
2009-02-19 19:51           ` Jay Soffian
2009-02-20  7:19   ` [PATCH 1/4] remote: minor code cleanups in preparation for changing "show" output Junio C Hamano
2009-02-20 10:50     ` Jay Soffian

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=1235020471-59982-3-git-send-email-jaysoffian@gmail.com \
    --to=jaysoffian@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.net \
    --cc=marcnarc@xiplink.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.