summaryrefslogtreecommitdiff
path: root/fetch-pack.h
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2012-09-09 08:19:43 +0200
committerJunio C Hamano <gitster@pobox.com>2012-09-12 11:46:31 -0700
commit4ba159996f6c1b0d6dd0a2a8bd9d6f5b342a4aa5 (patch)
treef358d131bb86e019d442b92cc1ce683b93461b44 /fetch-pack.h
parent4c58f13ba67f9dbe67a351de61703a2db20712cc (diff)
downloadgit-4ba159996f6c1b0d6dd0a2a8bd9d6f5b342a4aa5.tar.gz
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 <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fetch-pack.h')
-rw-r--r--fetch-pack.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fetch-pack.h b/fetch-pack.h
index a6a8a73311..cb148719bf 100644
--- a/fetch-pack.h
+++ b/fetch-pack.h
@@ -19,6 +19,13 @@ struct fetch_pack_args {
stateless_rpc:1;
};
+/*
+ * 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,