summaryrefslogtreecommitdiff
path: root/sha1-file.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-08 15:59:21 +0900
committerJunio C Hamano <gitster@pobox.com>2018-05-08 15:59:21 +0900
commit174774cd519846616edc475fcbc98237409ffc21 (patch)
tree604a92001e30c35c702e341c2aa835e41ce3a113 /sha1-file.c
parentb10edb2df55241b2e042b3d5473537904d09d193 (diff)
parent90e777f1e20dd6bdc022d5720a9169ea2205d9ad (diff)
downloadgit-174774cd519846616edc475fcbc98237409ffc21.tar.gz
Merge branch 'sb/object-store-replace'
The effort to pass the repository in-core structure throughout the API continues. This round deals with the code that implements the refs/replace/ mechanism. * sb/object-store-replace: replace-object: allow lookup_replace_object to handle arbitrary repositories replace-object: allow do_lookup_replace_object to handle arbitrary repositories replace-object: allow prepare_replace_object to handle arbitrary repositories refs: allow for_each_replace_ref to handle arbitrary repositories refs: store the main ref store inside the repository struct replace-object: add repository argument to lookup_replace_object replace-object: add repository argument to do_lookup_replace_object replace-object: add repository argument to prepare_replace_object refs: add repository argument to for_each_replace_ref refs: add repository argument to get_main_ref_store replace-object: check_replace_refs is safe in multi repo environment replace-object: eliminate replace objects prepared flag object-store: move lookup_replace_object to replace-object.h replace-object: move replace_map to object store replace_object: use oidmap
Diffstat (limited to 'sha1-file.c')
-rw-r--r--sha1-file.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sha1-file.c b/sha1-file.c
index 77ccaab928..64a5bd7d87 100644
--- a/sha1-file.c
+++ b/sha1-file.c
@@ -23,6 +23,7 @@
#include "sha1-lookup.h"
#include "bulk-checkin.h"
#include "repository.h"
+#include "replace-object.h"
#include "streaming.h"
#include "dir.h"
#include "list.h"
@@ -1239,7 +1240,7 @@ int oid_object_info_extended(const struct object_id *oid, struct object_info *oi
int already_retried = 0;
if (flags & OBJECT_INFO_LOOKUP_REPLACE)
- real = lookup_replace_object(oid);
+ real = lookup_replace_object(the_repository, oid);
if (is_null_oid(real))
return -1;
@@ -1383,8 +1384,8 @@ void *read_object_file_extended(const struct object_id *oid,
const struct packed_git *p;
const char *path;
struct stat st;
- const struct object_id *repl = lookup_replace ? lookup_replace_object(oid)
- : oid;
+ const struct object_id *repl = lookup_replace ?
+ lookup_replace_object(the_repository, oid) : oid;
errno = 0;
data = read_object(repl->hash, type, size);