diff options
author | Stefan Beller <sbeller@google.com> | 2018-06-28 18:22:12 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-06-29 10:43:39 -0700 |
commit | 84f80cd2db5daa71a68df9a71c13524700a4edc7 (patch) | |
tree | 19e90cff8ce995306554b9926ae995429b7319e2 /tag.c | |
parent | tag: allow lookup_tag to handle arbitrary repositories (diff) | |
download | tgif-84f80cd2db5daa71a68df9a71c13524700a4edc7.tar.xz |
tag: allow parse_tag_buffer to handle arbitrary repositories
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tag.c')
-rw-r--r-- | tag.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -126,7 +126,7 @@ void release_tag_memory(struct tag *t) t->date = 0; } -int parse_tag_buffer_the_repository(struct tag *item, const void *data, unsigned long size) +int parse_tag_buffer(struct repository *r, struct tag *item, const void *data, unsigned long size) { struct object_id oid; char type[20]; @@ -154,13 +154,13 @@ int parse_tag_buffer_the_repository(struct tag *item, const void *data, unsigned bufptr = nl + 1; if (!strcmp(type, blob_type)) { - item->tagged = (struct object *)lookup_blob(the_repository, &oid); + item->tagged = (struct object *)lookup_blob(r, &oid); } else if (!strcmp(type, tree_type)) { - item->tagged = (struct object *)lookup_tree(the_repository, &oid); + item->tagged = (struct object *)lookup_tree(r, &oid); } else if (!strcmp(type, commit_type)) { - item->tagged = (struct object *)lookup_commit(the_repository, &oid); + item->tagged = (struct object *)lookup_commit(r, &oid); } else if (!strcmp(type, tag_type)) { - item->tagged = (struct object *)lookup_tag(the_repository, &oid); + item->tagged = (struct object *)lookup_tag(r, &oid); } else { error("Unknown type %s", type); item->tagged = NULL; |