diff options
author | Stefan Beller <sbeller@google.com> | 2018-04-25 20:20:59 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-04-26 03:54:27 +0200 |
commit | 0df8e96566ddcae4adc4efc096944c064f60b8bd (patch) | |
tree | 19c8b0277b21dcd9a9baa71ca5541bd59853afae /refs.c | |
parent | cache.h: add repository argument to oid_object_info_extended (diff) | |
download | git-0df8e96566ddcae4adc4efc096944c064f60b8bd.tar.xz git-0df8e96566ddcae4adc4efc096944c064f60b8bd.zip |
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 'refs.c')
-rw-r--r-- | refs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -302,7 +302,7 @@ enum peel_status peel_object(const struct object_id *name, struct object_id *oid struct object *o = lookup_unknown_object(name->hash); if (o->type == OBJ_NONE) { - int type = oid_object_info(name, NULL); + int type = oid_object_info(the_repository, name, NULL); if (type < 0 || !object_as_type(o, type, 0)) return PEEL_INVALID; } |