summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
Diffstat (limited to 'builtin')
-rw-r--r--builtin/cat-file.c3
-rw-r--r--builtin/grep.c6
-rw-r--r--builtin/pack-objects.c3
3 files changed, 8 insertions, 4 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index 0f092382e1..995d47c85a 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -172,7 +172,8 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name,
* fall-back to the usual case.
*/
}
- buf = read_object_with_reference(&oid, exp_type, &size, NULL);
+ buf = read_object_with_reference(the_repository,
+ &oid, exp_type, &size, NULL);
break;
default:
diff --git a/builtin/grep.c b/builtin/grep.c
index 580fd38f41..560051784e 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -458,7 +458,8 @@ static int grep_submodule(struct grep_opt *opt,
object = parse_object_or_die(oid, oid_to_hex(oid));
grep_read_lock();
- data = read_object_with_reference(&object->oid, tree_type,
+ data = read_object_with_reference(&subrepo,
+ &object->oid, tree_type,
&size, NULL);
grep_read_unlock();
@@ -623,7 +624,8 @@ static int grep_object(struct grep_opt *opt, const struct pathspec *pathspec,
int hit, len;
grep_read_lock();
- data = read_object_with_reference(&obj->oid, tree_type,
+ data = read_object_with_reference(opt->repo,
+ &obj->oid, tree_type,
&size, NULL);
grep_read_unlock();
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index b2be8869c2..a030c24a4a 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -1428,7 +1428,8 @@ static void add_preferred_base(struct object_id *oid)
if (window <= num_preferred_base++)
return;
- data = read_object_with_reference(oid, tree_type, &size, &tree_oid);
+ data = read_object_with_reference(the_repository, oid,
+ tree_type, &size, &tree_oid);
if (!data)
return;