From afe7c5ff1f7f6741d35f9852a766d151da23d7d8 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 12 Dec 2011 19:41:37 -0500 Subject: drop "match" parameter from get_remote_heads The get_remote_heads function reads the list of remote refs during git protocol session. It dates all the way back to def88e9 (Commit first cut at "git-fetch-pack", 2005-07-04). At that time, the idea was to come up with a list of refs we were interested in, and then filter the list as we got it from the remote side. Later, 1baaae5 (Make maximal use of the remote refs, 2005-10-28) stopped filtering at the get_remote_heads layer, letting us use the non-matching refs to find common history. As a result, all callers now simply pass an empty match list (and any future callers will want to do the same). So let's drop these now-useless parameters. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- connect.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'connect.c') diff --git a/connect.c b/connect.c index 51990fa0cb..48df90bfe5 100644 --- a/connect.c +++ b/connect.c @@ -53,7 +53,6 @@ static void add_extra_have(struct extra_have_objects *extra, unsigned char *sha1 * Read all the refs from the other end */ struct ref **get_remote_heads(int in, struct ref **list, - int nr_match, char **match, unsigned int flags, struct extra_have_objects *extra_have) { @@ -92,8 +91,6 @@ struct ref **get_remote_heads(int in, struct ref **list, if (!check_ref(name, name_len, flags)) continue; - if (nr_match && !path_match(name, nr_match, match)) - continue; ref = alloc_ref(buffer + 41); hashcpy(ref->old_sha1, old_sha1); *list = ref; -- cgit v1.2.1