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>
Jay Soffian committed
Feb 25, 2009 at 03:32 UTC
7b9a5e276cc685788386f1dcbd6a201f9f18da16
1 file changed
+3
-10
builtin-remote.c
+3
-10
@@ -250,18 +250,11 @@ static int get_ref_states(const struct ref *ref, struct ref_states *states)
250
251
states->new.strdup_strings = states->tracked.strdup_strings = 1;
252
for (ref = fetch_map; ref; ref = ref->next) {
253
- struct string_list *target = &states->tracked;
253
unsigned char sha1[20];
255
- void *util = NULL;
256
-
254
if (!ref->peer_ref || read_ref(ref->peer_ref->name, sha1))
258
- target = &states->new;
259
- else {
260
- target = &states->tracked;
261
- if (hashcmp(sha1, ref->new_sha1))
262
- util = &states;
263
- }
264
- string_list_append(abbrev_branch(ref->name), target)->util = util;
255
+ string_list_append(abbrev_branch(ref->name), &states->new);
256
+ else
257
+ string_list_append(abbrev_branch(ref->name), &states->tracked);
258
}
259
free_refs(fetch_map);
260