diff options
author | Jeff King <peff@peff.net> | 2019-04-13 07:54:31 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-04-15 07:00:52 +0200 |
commit | 1027186fdd3bb55b2149693550542e0647feb7a3 (patch) | |
tree | c836b7e8598cc47ab27f2eae85cb130051a6375e /remote.h | |
parent | fetch: use free_refs() (diff) | |
download | git-1027186fdd3bb55b2149693550542e0647feb7a3.tar.xz git-1027186fdd3bb55b2149693550542e0647feb7a3.zip |
remote.c: make singular free_ref() public
We provide a free_refs() function to free a list, but there's no easy
way for a caller to free a single ref. Let's make our singular
free_ref() function public. Since its name is so similar to the
list-freeing free_refs(), and because both of those functions have the
same signature, it might be easy to accidentally use the wrong one.
Let's call the singular version the more verbose "free_one_ref()" to
distinguish it.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote.h')
-rw-r--r-- | remote.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -131,8 +131,10 @@ int ref_compare_name(const void *, const void *); int check_ref_type(const struct ref *ref, int flags); /* - * Frees the entire list and peers of elements. + * Free a single ref and its peer, or an entire list of refs and their peers, + * respectively. */ +void free_one_ref(struct ref *ref); void free_refs(struct ref *ref); struct oid_array; |