diff options
author | Stefan Beller <sbeller@google.com> | 2018-04-25 11:20:58 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-04-26 10:54:27 +0900 |
commit | 7ecd8690602170f0993923c99645c7c6005e3dfa (patch) | |
tree | 28d0e12f4a1aa5a4d05fb5fca86351377484edd0 /builtin | |
parent | replace-object: allow lookup_replace_object to handle arbitrary repositories (diff) | |
download | tgif-7ecd8690602170f0993923c99645c7c6005e3dfa.tar.xz |
cache.h: add repository argument to oid_object_info_extended
Add a repository argument to allow oid_object_info_extended callers
to be more specific about which repository to act on. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.
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')
-rw-r--r-- | builtin/cat-file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c index 2c46d257cd..4ecdb9ff54 100644 --- a/builtin/cat-file.c +++ b/builtin/cat-file.c @@ -77,7 +77,7 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name, switch (opt) { case 't': oi.type_name = &sb; - if (oid_object_info_extended(&oid, &oi, flags) < 0) + if (oid_object_info_extended(the_repository, &oid, &oi, flags) < 0) die("git cat-file: could not get object info"); if (sb.len) { printf("%s\n", sb.buf); @@ -88,7 +88,7 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name, case 's': oi.sizep = &size; - if (oid_object_info_extended(&oid, &oi, flags) < 0) + if (oid_object_info_extended(the_repository, &oid, &oi, flags) < 0) die("git cat-file: could not get object info"); printf("%lu\n", size); return 0; @@ -342,7 +342,7 @@ static void batch_object_write(const char *obj_name, struct batch_options *opt, struct strbuf buf = STRBUF_INIT; if (!data->skip_object_info && - oid_object_info_extended(&data->oid, &data->info, + oid_object_info_extended(the_repository, &data->oid, &data->info, OBJECT_INFO_LOOKUP_REPLACE) < 0) { printf("%s missing\n", obj_name ? obj_name : oid_to_hex(&data->oid)); |