]> git.ipfire.org Git - thirdparty/git.git/commitdiff
odb: drop `whence` field from object info
authorPatrick Steinhardt <ps@pks.im>
Thu, 2 Jul 2026 12:02:03 +0000 (14:02 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 2 Jul 2026 16:52:32 +0000 (09:52 -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 34c35c47a54d58df18047fcd48ff1dc8e8c7b424..175a1ee42cb9e239949528910b5407a2d87ce63e 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->source_infop)
                *input_oi->source_infop = *new_oi.source_infop;
        return ret;
diff --git a/odb.h b/odb.h
index 659bf8afe145917e911a576a5587d2f9bfd03ab0..c251788d5016aeffce42aa2849077a0925e4c5dd 100644 (file)
--- a/odb.h
+++ b/odb.h
@@ -311,13 +311,6 @@ struct object_info {
         * or multiple times in the same source.
         */
        struct odb_source_info *source_infop;
-
-       /* Response */
-       enum {
-               OI_CACHED,
-               OI_LOOSE,
-               OI_PACKED,
-       } whence;
 };
 
 /*
index 1d173bfa46d12f75ba30fa830616d60f317220de..460aec821c386b9127108745e25b3d077e60befc 100644 (file)
@@ -54,8 +54,6 @@ static void populate_object_info(struct odb_source_inmemory *source,
                *oi->mtimep = 0;
        if (oi->source_infop)
                oi->source_infop->source = &source->base;
-
-       oi->whence = OI_CACHED;
 }
 
 static int odb_source_inmemory_read_object_info(struct odb_source *source,
index c254957602f4d183198b8f1cf16628d1c728b108..54df2e57d33b78bbcfb151325b5208af7992ca2b 100644 (file)
@@ -198,8 +198,6 @@ out:
                        oidclr(oi->delta_base_oid, loose->base.odb->repo->hash_algo);
                if (oi->source_infop && !ret)
                        oi->source_infop->source = &loose->base;
-               if (!ret)
-                       oi->whence = OI_LOOSE;
        }
 
        return ret;
index ce51d1e5a371cc960997875a5d86e8ff80c66cbf..8fa6309a09939733b53c821bbf03f4e5c318cc4d 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->source_infop) {
                if (!source)
                        BUG("cannot request source without an owning source");