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@xxxxxxxxx> --- 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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html