From: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/6] object-file: move logic to read loose objects into backend
Date: Tue, 10 Nov 2026 18:40:59 +0530 [thread overview]
Message-ID: <6a4a230b-2f8a-4a26-ae08-8439a0f597b6@gmail.com> (raw)
In-Reply-To: <20261102-pks-odb-loose-cleanups-v1-1-fbbc86c29693@pks.im>
On 11/2/26 16:50, Patrick Steinhardt wrote:
> The logic to read loose objects is still contained in "object-file.c"
> even though it's an implementation detail of the "loose" backend, and
> that backend is nowadays also the only remaining caller.
>
> Move the logic around and remove the accompanying declarations.
>
The move looks justified as mentioned in the commit message.
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
> object-file.c | 300 ---------------------------------------------------
All functions moved from object-file,c are properly moved over to
odb/source-loose.c and they are marked static which is also appropriate.
> object-file.h | 45 --------
> odb/source-loose.c | 306 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 306 insertions(+), 345 deletions(-)
> diff --git a/object-file.h b/object-file.h
> index f44758c4f8b..65ab44542b0 100644
> --- a/object-file.h
> +++ b/object-file.h
> @@ -21,7 +21,6 @@ enum {
> int index_fd(struct index_state *istate, struct object_id *oid, int fd, struct stat *st, enum object_type type, const char *path, unsigned flags);
> int index_path(struct index_state *istate, struct object_id *oid, const char *path, struct stat *st, unsigned flags);
>
> -struct object_info;
> struct odb_source;
>
> /*
> @@ -122,50 +121,6 @@ void hash_object_file(const struct git_hash_algo *algo, const void *buf,
> int check_and_freshen_file(const char *fn, int freshen,
> const time_t *mtime);
>
> -/*
> - * Open the loose object at path, check its hash, and return the contents,
> - * use the "oi" argument to assert things about the object, or e.g. populate its
> - * type, and size. If the object is a blob, then "contents" may return NULL,
> - * to allow streaming of large blobs.
> - *
> - * Returns 0 on success, negative on error (details may be written to stderr).
> - */
We're losing these documentation comments during the move. Can we retain
the same above the static functions in odb/source-loose.c?
Rest of the patch looks good to me.
--
Sivaraam
next prev parent reply other threads:[~2026-11-10 13:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 11:20 [PATCH 0/6] object-file: move logic related to the loose backend Patrick Steinhardt
2026-11-02 11:20 ` [PATCH 1/6] object-file: move logic to read loose objects into backend Patrick Steinhardt
2026-11-10 13:10 ` Kaartic Sivaraam [this message]
2026-11-11 13:38 ` Patrick Steinhardt
2026-11-02 11:20 ` [PATCH 2/6] object-file: move logic to derive loose object paths " Patrick Steinhardt
2026-11-10 13:28 ` Kaartic Sivaraam
2026-11-11 13:40 ` Patrick Steinhardt
2026-11-02 11:20 ` [PATCH 3/6] object-file: move iteration over loose files " Patrick Steinhardt
2026-11-10 13:57 ` Kaartic Sivaraam
2026-11-02 11:20 ` [PATCH 4/6] odb/source-loose: deduplicate logic to mmap objects Patrick Steinhardt
2026-11-10 14:15 ` Kaartic Sivaraam
2026-11-11 13:40 ` Patrick Steinhardt
2026-11-02 11:20 ` [PATCH 5/6] object-file: stop including "odb/source-loose.h" Patrick Steinhardt
2026-11-10 16:13 ` Kaartic Sivaraam
2026-11-11 13:40 ` Patrick Steinhardt
2026-11-02 11:20 ` [PATCH 6/6] object-file: stop including "git-zlib.h" Patrick Steinhardt
2026-11-10 16:13 ` Kaartic Sivaraam
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=6a4a230b-2f8a-4a26-ae08-8439a0f597b6@gmail.com \
--to=kaartic.sivaraam@gmail.com \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
/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