From: Christian Couder <christian.couder@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
"brian m . carlson" <sandals@crustytoothpaste.net>,
Patrick Steinhardt <ps@pks.im>, Elijah Newren <newren@gmail.com>,
Jeff King <peff@peff.net>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: [PATCH 02/13] loose: rename repo_add_loose_object_map
Date: Wed, 21 Oct 2026 08:32:34 +0200 [thread overview]
Message-ID: <20261021063245.2917625-3-christian.couder@gmail.com> (raw)
In-Reply-To: <20261021063245.2917625-1-christian.couder@gmail.com>
From: "brian m. carlson" <sandals@crustytoothpaste.net>
The pointer it takes is not a struct repository, but a struct
odb_source_loose. Let's rename this and we'll use it in our object
database abstraction in a future commit.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
loose.c | 6 +++---
loose.h | 6 +++---
odb/source-loose.c | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/loose.c b/loose.c
index fe8f540979..8d7ea27448 100644
--- a/loose.c
+++ b/loose.c
@@ -210,9 +210,9 @@ static int write_one_object(struct odb_source_loose *loose,
return -1;
}
-int repo_add_loose_object_map(struct odb_source_loose *loose,
- const struct object_id *oid,
- const struct object_id *compat_oid)
+int source_add_loose_object_map(struct odb_source_loose *loose,
+ const struct object_id *oid,
+ const struct object_id *compat_oid)
{
int inserted = 0;
diff --git a/loose.h b/loose.h
index f3b1e47363..6f0c8554ca 100644
--- a/loose.h
+++ b/loose.h
@@ -18,9 +18,6 @@ int repo_loose_object_map_oid(struct repository *repo,
const struct object_id *src,
const struct git_hash_algo *dest_algo,
struct object_id *dest);
-int repo_add_loose_object_map(struct odb_source_loose *loose,
- const struct object_id *oid,
- const struct object_id *compat_oid);
int repo_read_loose_object_map(struct repository *repo);
int repo_write_loose_object_map(struct repository *repo);
@@ -28,5 +25,8 @@ int source_loose_object_map_oid(struct odb_source_loose *loose,
const struct object_id *src,
const struct git_hash_algo *to,
struct object_id *dest);
+int source_add_loose_object_map(struct odb_source_loose *loose,
+ const struct object_id *oid,
+ const struct object_id *compat_oid);
#endif
diff --git a/odb/source-loose.c b/odb/source-loose.c
index 0664634938..3c0c85f3e3 100644
--- a/odb/source-loose.c
+++ b/odb/source-loose.c
@@ -848,7 +848,7 @@ static int odb_source_loose_write_object(struct odb_source *source,
return -1;
if (compat_oid)
- return repo_add_loose_object_map(loose, oid, compat_oid);
+ return source_add_loose_object_map(loose, oid, compat_oid);
return 0;
}
@@ -970,7 +970,7 @@ static int odb_source_loose_write_object_stream(struct odb_source *source,
err = finalize_object_file_flags(loose->base.odb->repo, tmp_file.buf, filename.buf,
FOF_SKIP_COLLISION_CHECK);
if (!err && compat)
- err = repo_add_loose_object_map(loose, oid, &compat_oid);
+ err = source_add_loose_object_map(loose, oid, &compat_oid);
cleanup:
strbuf_release(&tmp_file);
strbuf_release(&filename);
--
2.56.0.215.g47fdf2208c
next prev parent reply other threads:[~2026-10-21 6:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 6:32 [PATCH 00/13] SHA-1/SHA-256 interoperability, part 3: pack index v3 Christian Couder
2026-10-21 6:32 ` [PATCH 01/13] loose: allow looking up in object map with source Christian Couder
2026-10-21 6:32 ` Christian Couder [this message]
2026-10-21 6:32 ` [PATCH 03/13] loose: add a flag to control whether we write mapped OIDs Christian Couder
2026-10-21 6:32 ` [PATCH 04/13] odb: implement interoperability functions Christian Couder
2026-10-21 6:32 ` [PATCH 05/13] object-file-convert: implement mapping in terms of object DB Christian Couder
2026-10-21 6:32 ` [PATCH 06/13] pack-write: add support for pack index v3 Christian Couder
2026-10-21 6:32 ` [PATCH 07/13] builtin: populate pack index v3 fields when indexing Christian Couder
2026-10-21 6:32 ` [PATCH 08/13] object-file: handle compatibility algorithm Christian Couder
2026-10-21 6:32 ` [PATCH 09/13] packfile: add support for reading pack index v3 Christian Couder
2026-10-21 6:32 ` [PATCH 10/13] packfile: validate pack index v3 tables Christian Couder
2026-10-21 6:32 ` [PATCH 11/13] loose: map object IDs using pack index v3 Christian Couder
2026-10-21 6:32 ` [PATCH 12/13] packfile: allow looking up compat object IDs in packs Christian Couder
2026-10-21 6:32 ` [PATCH 13/13] doc: move pack index v3 documentation Christian Couder
2026-10-21 19:01 ` [PATCH 00/13] SHA-1/SHA-256 interoperability, part 3: pack index v3 Junio C Hamano
2026-10-23 7:34 ` Christian Couder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261021063245.2917625-3-christian.couder@gmail.com \
--to=christian.couder@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=newren@gmail.com \
--cc=peff@peff.net \
--cc=ps@pks.im \
--cc=sandals@crustytoothpaste.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox