path: root/fetch-pack.h
diff options
authorMichael Haggerty <>2012-09-09 06:19:43 (GMT)
committerJunio C Hamano <>2012-09-12 18:46:31 (GMT)
commit4ba159996f6c1b0d6dd0a2a8bd9d6f5b342a4aa5 (patch)
treef358d131bb86e019d442b92cc1ce683b93461b44 /fetch-pack.h
parent4c58f13ba67f9dbe67a351de61703a2db20712cc (diff)
filter_refs(): delete matched refs from sought list
Remove any references that are available from the remote from the sought list (rather than overwriting their names with NUL characters, as previously). Mark matching entries by writing a non-NULL pointer to string_list_item::util during the iteration, then use filter_string_list() later to filter out the entries that have been marked. Document this aspect of fetch_pack() in a comment in the header file. (More documentation is obviously still needed.) Signed-off-by: Michael Haggerty <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'fetch-pack.h')
1 files changed, 7 insertions, 0 deletions
diff --git a/fetch-pack.h b/fetch-pack.h
index a6a8a73..cb14871 100644
--- a/fetch-pack.h
+++ b/fetch-pack.h
@@ -19,6 +19,13 @@ struct fetch_pack_args {
+ * sought contains the full names of remote references that should be
+ * updated from. On return, the names that were found on the remote
+ * will have been removed from the list. The util members of the
+ * string_list_items are used internally; they must be NULL on entry
+ * (and will be NULL on exit).
+ */
struct ref *fetch_pack(struct fetch_pack_args *args,
int fd[], struct child_process *conn,
const struct ref *ref,