MCPcopy Create free account
hub / github.com/git/git / append_ref_to_tracked_list

Function append_ref_to_tracked_list

builtin/remote.c:1129–1145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1127}
1128
1129static int append_ref_to_tracked_list(const struct reference *ref, void *cb_data)
1130{
1131 struct ref_states *states = cb_data;
1132 struct refspec_item refspec;
1133
1134 if (ref->flags & REF_ISSYMREF)
1135 return 0;
1136
1137 memset(&refspec, 0, sizeof(refspec));
1138 refspec.dst = (char *)ref->name;
1139 if (!remote_find_tracking(states->remote, &refspec)) {
1140 string_list_append(&states->tracked, abbrev_branch(refspec.src));
1141 free(refspec.src);
1142 }
1143
1144 return 0;
1145}
1146
1147static int get_remote_ref_states(const char *name,
1148 struct ref_states *states,

Callers

nothing calls this directly

Calls 2

remote_find_trackingFunction · 0.85
string_list_appendFunction · 0.50

Tested by

no test coverage detected