summaryrefslogtreecommitdiff
path: root/builtin/tag.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-04-25 18:20:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-04-26 01:54:27 (GMT)
commit0df8e96566ddcae4adc4efc096944c064f60b8bd (patch)
tree19c8b0277b21dcd9a9baa71ca5541bd59853afae /builtin/tag.c
parent7ecd8690602170f0993923c99645c7c6005e3dfa (diff)
downloadgit-0df8e96566ddcae4adc4efc096944c064f60b8bd.zip
git-0df8e96566ddcae4adc4efc096944c064f60b8bd.tar.gz
git-0df8e96566ddcae4adc4efc096944c064f60b8bd.tar.bz2
cache.h: add repository argument to oid_object_info
Add a repository argument to allow the callers of oid_object_info to be more specific about which repository to handle. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with the previous commits, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller <sbeller@google.com> Reviewed-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/tag.c')
-rw-r--r--builtin/tag.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/tag.c b/builtin/tag.c
index 8cff6d0..26d7729 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -212,7 +212,7 @@ static void create_tag(const struct object_id *object, const char *tag,
struct strbuf header = STRBUF_INIT;
char *path = NULL;
- type = oid_object_info(object, NULL);
+ type = oid_object_info(the_repository, object, NULL);
if (type <= OBJ_NONE)
die(_("bad object type."));
@@ -298,7 +298,7 @@ static void create_reflog_msg(const struct object_id *oid, struct strbuf *sb)
}
strbuf_addstr(sb, " (");
- type = oid_object_info(oid, NULL);
+ type = oid_object_info(the_repository, oid, NULL);
switch (type) {
default:
strbuf_addstr(sb, "object of unknown type");