summaryrefslogtreecommitdiff
path: root/builtin/cat-file.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-04-25 18:20:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-04-26 01:54:27 (GMT)
commit7ecd8690602170f0993923c99645c7c6005e3dfa (patch)
tree28d0e12f4a1aa5a4d05fb5fca86351377484edd0 /builtin/cat-file.c
parent90e777f1e20dd6bdc022d5720a9169ea2205d9ad (diff)
downloadgit-7ecd8690602170f0993923c99645c7c6005e3dfa.zip
git-7ecd8690602170f0993923c99645c7c6005e3dfa.tar.gz
git-7ecd8690602170f0993923c99645c7c6005e3dfa.tar.bz2
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/cat-file.c')
-rw-r--r--builtin/cat-file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index 2c46d25..4ecdb9f 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));