summaryrefslogtreecommitdiff
path: root/remote.h
diff options
context:
space:
mode:
authorDaniel Barkalow <barkalow@iabervon.org>2007-07-10 00:47:23 -0400
committerJunio C Hamano <gitster@pobox.com>2007-07-09 23:39:59 -0700
commitdfd255dd1a7c04ad24891db50e5d80d96f93fd4a (patch)
tree0a7640ebb74f4f2b60ccc1dbc7cc87070b777f04 /remote.h
parent54dadbdb29668fbd51effefd0a0c65d915f5422b (diff)
downloadgit-dfd255dd1a7c04ad24891db50e5d80d96f93fd4a.tar.gz
Add allocation and freeing functions for struct refs
Instead of open-coding allocation wherever it happens, have a function. Also, add a function to free a list of refs, which we currently never actually do. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote.h')
-rw-r--r--remote.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/remote.h b/remote.h
index 01dbcef670..080b7dab99 100644
--- a/remote.h
+++ b/remote.h
@@ -30,6 +30,13 @@ struct refspec {
char *dst;
};
+struct ref *alloc_ref(unsigned namelen);
+
+/*
+ * Frees the entire list and peers of elements.
+ */
+void free_refs(struct ref *ref);
+
int match_refs(struct ref *src, struct ref *dst, struct ref ***dst_tail,
int nr_refspec, char **refspec, int all);