]> git.ipfire.org Git - thirdparty/git.git/commitdiff
odb: drop `whence` field from object info
authorPatrick Steinhardt <ps@pks.im>
Wed, 24 Jun 2026 12:19:18 +0000 (14:19 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Jun 2026 17:12:35 +0000 (10:12 -0700)
In the preceding commits we have migrated all callers to derive their
information of how a specific object is stored to use the new object
info source instead, and hence the field is now unused. Drop it.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
odb.c
odb.h
odb/source-inmemory.c
odb/source-loose.c
packfile.c

diff --git a/odb.c b/odb.c
index 99f4e7551c427432041e3f6800b7cda0a8ba296d..82c41f179365d20255013e029151912cd277a70a 100644 (file)
--- a/odb.c
+++ b/odb.c
@@ -691,7 +691,6 @@ static int oid_object_info_convert(struct repository *r,
                        return -1;
                }
        }
-       input_oi->whence = new_oi.whence;
        if (input_oi->sourcep)
                *input_oi->sourcep = *new_oi.sourcep;
        return ret;
diff --git a/odb.h b/odb.h
index 330a55879ed772431646ab28ab89ab21d4b1792b..e0d05eaf873f6911bfa0dd737ad4f101add3ee1d 100644 (file)
--- a/odb.h
+++ b/odb.h
@@ -311,13 +311,6 @@ struct object_info {
         * or multiple times in the same source.
         */
        struct object_info_source *sourcep;
-
-       /* Response */
-       enum {
-               OI_CACHED,
-               OI_LOOSE,
-               OI_PACKED,
-       } whence;
 };
 
 /*
index 2328e62687bf4903f3c09b2ba8b1a424ceddbfff..008e49bfe9faa18c6cf9034c7c9a7e2cc3c415be 100644 (file)
@@ -54,8 +54,6 @@ static void populate_object_info(struct odb_source_inmemory *source,
                *oi->mtimep = 0;
        if (oi->sourcep)
                oi->sourcep->source = &source->base;
-
-       oi->whence = OI_CACHED;
 }
 
 static int odb_source_inmemory_read_object_info(struct odb_source *source,
index 5c4e9892b51bc682d90c0cdcae2ca5ae11c19eca..e743ccab42d398df06f1e7f8aee011c44cc08ac2 100644 (file)
@@ -198,8 +198,6 @@ out:
                        oidclr(oi->delta_base_oid, loose->base.odb->repo->hash_algo);
                if (oi->sourcep && !ret)
                        oi->sourcep->source = &loose->base;
-               if (!ret)
-                       oi->whence = OI_LOOSE;
        }
 
        return ret;
index fa22095b757697dfbb84e89befb46111f4d349c3..4a8c108034c5aa662ada6845e09513f077897c6d 100644 (file)
@@ -1421,8 +1421,6 @@ int packed_object_info_with_index_pos(struct odb_source_packed *source,
                        oidclr(oi->delta_base_oid, p->repo->hash_algo);
        }
 
-       oi->whence = OI_PACKED;
-
        if (oi->sourcep) {
                if (!source)
                        BUG("cannot request source without an owning source");