summaryrefslogtreecommitdiff
path: root/builtin/prune.c
diff options
context:
space:
mode:
authorLibravatar Stefan Beller <sbeller@google.com>2018-04-25 11:20:59 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-04-26 10:54:27 +0900
commit0df8e96566ddcae4adc4efc096944c064f60b8bd (patch)
tree19c8b0277b21dcd9a9baa71ca5541bd59853afae /builtin/prune.c
parentcache.h: add repository argument to oid_object_info_extended (diff)
downloadtgif-0df8e96566ddcae4adc4efc096944c064f60b8bd.tar.xz
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/prune.c')
-rw-r--r--builtin/prune.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/prune.c b/builtin/prune.c
index 38ced18dad..518ffbea13 100644
--- a/builtin/prune.c
+++ b/builtin/prune.c
@@ -50,7 +50,8 @@ static int prune_object(const struct object_id *oid, const char *fullpath,
if (st.st_mtime > expire)
return 0;
if (show_only || verbose) {
- enum object_type type = oid_object_info(oid, NULL);
+ enum object_type type = oid_object_info(the_repository, oid,
+ NULL);
printf("%s %s\n", oid_to_hex(oid),
(type > 0) ? type_name(type) : "unknown");
}