diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-05-08 08:59:21 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-08 08:59:21 +0200 |
commit | 174774cd519846616edc475fcbc98237409ffc21 (patch) | |
tree | 604a92001e30c35c702e341c2aa835e41ce3a113 /cache.h | |
parent | Merge branch 'ds/commit-graph' (diff) | |
parent | replace-object: allow lookup_replace_object to handle arbitrary repositories (diff) | |
download | git-174774cd519846616edc475fcbc98237409ffc21.tar.xz git-174774cd519846616edc475fcbc98237409ffc21.zip |
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 'cache.h')
-rw-r--r-- | cache.h | 19 |
1 files changed, 0 insertions, 19 deletions
@@ -1193,25 +1193,6 @@ static inline void *read_object_file(const struct object_id *oid, enum object_ty return read_object_file_extended(oid, type, size, 1); } -/* - * This internal function is only declared here for the benefit of - * lookup_replace_object(). Please do not call it directly. - */ -extern const struct object_id *do_lookup_replace_object(const struct object_id *oid); - -/* - * If object sha1 should be replaced, return the replacement object's - * name (replaced recursively, if necessary). The return value is - * either sha1 or a pointer to a permanently-allocated value. When - * object replacement is suppressed, always return sha1. - */ -static inline const struct object_id *lookup_replace_object(const struct object_id *oid) -{ - if (!check_replace_refs) - return oid; - return do_lookup_replace_object(oid); -} - /* Read and unpack an object file into memory, write memory to an object file */ extern int oid_object_info(const struct object_id *, unsigned long *); |