aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-04-01 01:57:50 +0200
committerJunio C Hamano <gitster@pobox.com>2026-03-31 20:43:14 -0700
commitc63911b052dc286de5daddba8d4a20fd59348cee (patch)
tree4e22beca001ac84fbab80727ace17a289ca2a46c /builtin
parentb2d421ece6a8e095394e76930e6929ee036571ef (diff)
downloadgit-c63911b052dc286de5daddba8d4a20fd59348cee.tar.xz
odb: rename `odb_has_object()` flags
Rename `odb_has_object()` flags to be properly prefixed with the function name. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/cat-file.c2
-rw-r--r--builtin/fetch.c4
-rw-r--r--builtin/fsck.c2
-rw-r--r--builtin/index-pack.c2
-rw-r--r--builtin/receive-pack.c2
-rw-r--r--builtin/remote.c2
-rw-r--r--builtin/show-ref.c2
-rw-r--r--builtin/unpack-objects.c2
8 files changed, 9 insertions, 9 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index cd13a3a89f..d9fbad5358 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -161,7 +161,7 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
case 'e':
ret = !odb_has_object(the_repository->objects, &oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR);
+ ODB_HAS_OBJECT_RECHECK_PACKED | ODB_HAS_OBJECT_FETCH_PROMISOR);
goto cleanup;
case 'w':
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 4795b2a13c..a22c319467 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -946,7 +946,7 @@ static int update_local_ref(struct ref *ref,
int fast_forward = 0;
if (!odb_has_object(the_repository->objects, &ref->new_oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
+ ODB_HAS_OBJECT_RECHECK_PACKED | ODB_HAS_OBJECT_FETCH_PROMISOR))
die(_("object %s not found"), oid_to_hex(&ref->new_oid));
if (oideq(&ref->old_oid, &ref->new_oid)) {
@@ -1396,7 +1396,7 @@ static int check_exist_and_connected(struct ref *ref_map)
*/
for (r = rm; r; r = r->next) {
if (!odb_has_object(the_repository->objects, &r->old_oid,
- HAS_OBJECT_RECHECK_PACKED))
+ ODB_HAS_OBJECT_RECHECK_PACKED))
return -1;
}
diff --git a/builtin/fsck.c b/builtin/fsck.c
index 9bab32effe..4bd0faeff1 100644
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
@@ -163,7 +163,7 @@ static int mark_object(struct object *obj, enum object_type type,
if (!(obj->flags & HAS_OBJ)) {
if (parent && !odb_has_object(the_repository->objects, &obj->oid,
- HAS_OBJECT_RECHECK_PACKED)) {
+ ODB_HAS_OBJECT_RECHECK_PACKED)) {
printf_ln(_("broken link from %7s %s\n"
" to %7s %s"),
printable_type(&parent->oid, parent->type),
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index d1e47279a8..d96d0eb8cf 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -891,7 +891,7 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
if (startup_info->have_repository) {
read_lock();
collision_test_needed = odb_has_object(the_repository->objects, oid,
- HAS_OBJECT_FETCH_PROMISOR);
+ ODB_HAS_OBJECT_FETCH_PROMISOR);
read_unlock();
}
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index e34edff406..32b0223884 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -1546,7 +1546,7 @@ static const char *update(struct command *cmd, struct shallow_info *si)
if (!is_null_oid(new_oid) &&
!odb_has_object(the_repository->objects, new_oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR)) {
+ ODB_HAS_OBJECT_RECHECK_PACKED | ODB_HAS_OBJECT_FETCH_PROMISOR)) {
error("unpack should have generated %s, "
"but I can't find it!", oid_to_hex(new_oid));
ret = "bad pack";
diff --git a/builtin/remote.c b/builtin/remote.c
index 0fddaa1773..de989ea3ba 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -473,7 +473,7 @@ static int get_push_ref_states(const struct ref *remote_refs,
else if (is_null_oid(&ref->old_oid))
info->status = PUSH_STATUS_CREATE;
else if (odb_has_object(the_repository->objects, &ref->old_oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR) &&
+ ODB_HAS_OBJECT_RECHECK_PACKED | ODB_HAS_OBJECT_FETCH_PROMISOR) &&
ref_newer(&ref->new_oid, &ref->old_oid))
info->status = PUSH_STATUS_FASTFORWARD;
else
diff --git a/builtin/show-ref.c b/builtin/show-ref.c
index 5d31acea7c..d508441632 100644
--- a/builtin/show-ref.c
+++ b/builtin/show-ref.c
@@ -37,7 +37,7 @@ static void show_one(const struct show_one_options *opts,
struct object_id peeled;
if (!odb_has_object(the_repository->objects, ref->oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
+ ODB_HAS_OBJECT_RECHECK_PACKED | ODB_HAS_OBJECT_FETCH_PROMISOR))
die("git show-ref: bad ref %s (%s)", ref->name,
oid_to_hex(ref->oid));
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c
index 6fc64e9e4b..871fc8fff5 100644
--- a/builtin/unpack-objects.c
+++ b/builtin/unpack-objects.c
@@ -449,7 +449,7 @@ static void unpack_delta_entry(enum object_type type, unsigned long delta_size,
if (!delta_data)
return;
if (odb_has_object(the_repository->objects, &base_oid,
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
+ ODB_HAS_OBJECT_RECHECK_PACKED | ODB_HAS_OBJECT_FETCH_PROMISOR))
; /* Ok we have this one */
else if (resolve_against_held(nr, &base_oid,
delta_data, delta_size))