Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-01-07 16:50:19 +0300
committerJunio C Hamano <gitster@pobox.com>2023-01-08 04:52:55 +0300
commit7be13f5f743978180ba377e12a312b773ed9af2b (patch)
tree824f3610aad9e93b5c2c034661eb52956b679449 /object-file.c
parent34728d7f30c1af6cf48a72b807796b719ab1c111 (diff)
read_object_file_extended(): drop lookup_replace option
Our sole caller always passes in "1", so we can just drop the parameter entirely. Anybody who doesn't want this behavior could easily call oid_object_info_extended() themselves, as we're just a thin wrapper around it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object-file.c')
-rw-r--r--object-file.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/object-file.c b/object-file.c
index ed1babbac2..f472f2d6a0 100644
--- a/object-file.c
+++ b/object-file.c
@@ -1698,18 +1698,15 @@ int pretend_object_file(void *buf, unsigned long len, enum object_type type,
void *read_object_file_extended(struct repository *r,
const struct object_id *oid,
enum object_type *type,
- unsigned long *size,
- int lookup_replace)
+ unsigned long *size)
{
struct object_info oi = OBJECT_INFO_INIT;
- unsigned flags = OBJECT_INFO_DIE_IF_CORRUPT;
+ unsigned flags = OBJECT_INFO_DIE_IF_CORRUPT | OBJECT_INFO_LOOKUP_REPLACE;
void *data;
oi.typep = type;
oi.sizep = size;
oi.contentp = &data;
- if (lookup_replace)
- flags |= OBJECT_INFO_LOOKUP_REPLACE;
if (oid_object_info_extended(r, oid, &oi, flags))
return NULL;