summaryrefslogtreecommitdiff
path: root/builtin-remote.c
diff options
context:
space:
mode:
authorJay Soffian <jaysoffian@gmail.com>2009-02-25 03:32:20 -0500
committerJunio C Hamano <gitster@pobox.com>2009-02-27 15:19:08 -0800
commit7b9a5e276cc685788386f1dcbd6a201f9f18da16 (patch)
treede0e47743d0a4d75d7ca3e519e29c7992c0e22b3 /builtin-remote.c
parent88733235615b24198599b533f9d02578ef739536 (diff)
downloadgit-7b9a5e276cc685788386f1dcbd6a201f9f18da16.tar.gz
builtin-remote: remove unused code in get_ref_states
get_ref_states() populates the util pointer of the string_list_item's that it adds to states->new and states->tracked, but nothing ever uses the pointer, so we can get rid of the extra code. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-remote.c')
-rw-r--r--builtin-remote.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/builtin-remote.c b/builtin-remote.c
index b89a3534de..3e6dee4ad5 100644
--- a/builtin-remote.c
+++ b/builtin-remote.c
@@ -250,18 +250,11 @@ static int get_ref_states(const struct ref *ref, struct ref_states *states)
states->new.strdup_strings = states->tracked.strdup_strings = 1;
for (ref = fetch_map; ref; ref = ref->next) {
- struct string_list *target = &states->tracked;
unsigned char sha1[20];
- void *util = NULL;
-
if (!ref->peer_ref || read_ref(ref->peer_ref->name, sha1))
- target = &states->new;
- else {
- target = &states->tracked;
- if (hashcmp(sha1, ref->new_sha1))
- util = &states;
- }
- string_list_append(abbrev_branch(ref->name), target)->util = util;
+ string_list_append(abbrev_branch(ref->name), &states->new);
+ else
+ string_list_append(abbrev_branch(ref->name), &states->tracked);
}
free_refs(fetch_map);