From: Patrick Steinhardt <ps@pks.im>
To: Karthik Nayak <karthik.188@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/7] loose: drop unused `repo_write_loose_object_map()`
Date: Tue, 20 Oct 2026 10:49:54 +0200 [thread overview]
Message-ID: <atcrJ2u9F_9M9wTl@pks.im> (raw)
In-Reply-To: <CAOLa=ZT91C0OZE=h7B0j6mgPhfrGjkRN4bCT9gVEXdXx+bSi1A@mail.gmail.com>
On Mon, Oct 19, 2026 at 01:21:08PM -0700, Karthik Nayak wrote:
> Patrick Steinhardt <ps@pks.im> writes:
>
> > The function `repo_write_loose_object_map()` was introduced in
> > 23b2c7e95b (loose: add a mapping between SHA-1 and SHA-256 for loose
> > objects, 2023-10-01), but it never had any callers as loose object maps
> > are instead written incrementally via `repo_add_loose_object_map()`
> > whenever a new loose object is created.
> >
> > Besides being dead code, the function also hardcodes the location of the
> > "loose-object-idx" file as "$GIT_COMMON_DIR/objects", whereas both the
> > reader and `repo_add_loose_object_map()` derive the location from the
> > loose source's path. The function would thus disagree with everyone else
> > where the loose object map is supposed to be located when the object
> > directory is using a non-default location.
> >
> > Remove the function.
> >
>
> It's like the function being unused is an insufficient argument by
> itself, so we also talk about why its incorrect. Made me chuckle.
Yeah. The only reason that I even stumbled over this function is that
it'll break with the object storage format extension, because it would
put files into the wrong location. I only realized later on that the
function isn't even used at all. But that probably explains why this
message is a bit on the excessive side.
Should I trim it?
Patrick
next prev parent reply other threads:[~2026-10-20 8:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 8:55 [PATCH 0/7] odb: introduce object storage extension Patrick Steinhardt
2026-10-19 8:55 ` [PATCH 1/7] loose: drop unused `repo_write_loose_object_map()` Patrick Steinhardt
2026-10-19 20:21 ` Karthik Nayak
2026-10-20 8:49 ` Patrick Steinhardt [this message]
2026-10-19 8:55 ` [PATCH 2/7] setup: introduce object storage extension Patrick Steinhardt
2026-10-19 21:29 ` Karthik Nayak
2026-10-20 1:27 ` Junio C Hamano
2026-10-20 8:50 ` Patrick Steinhardt
2026-10-19 8:55 ` [PATCH 3/7] setup: allow overriding object storage format via environment Patrick Steinhardt
2026-10-19 21:34 ` Karthik Nayak
2026-10-20 8:50 ` Patrick Steinhardt
2026-10-19 8:55 ` [PATCH 4/7] builtin: expose the object storage format Patrick Steinhardt
2026-10-19 21:40 ` Karthik Nayak
2026-10-20 8:50 ` Patrick Steinhardt
2026-10-19 8:56 ` [PATCH 5/7] builtin/init: introduce handling of " Patrick Steinhardt
2026-10-19 8:56 ` [PATCH 6/7] builtin/clone: introduce "--object-storage-format=" Patrick Steinhardt
2026-10-19 8:56 ` [PATCH 7/7] builtin/submodule: propagate "--object-storage-format=" Patrick Steinhardt
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=atcrJ2u9F_9M9wTl@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=karthik.188@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.