From: "Pablo Sabater" <pabloosabaterr@gmail.com>
To: "Karthik Nayak" <karthik.188@gmail.com>,
"Pablo Sabater" <pabloosabaterr@gmail.com>, <git@vger.kernel.org>
Cc: "Derrick Stolee" <stolee@gmail.com>
Subject: Re: [PATCH RFC 2/5] fetch-object-info: add enum for fetch_object_info() statuses
Date: Wed, 30 Sep 2026 12:59:21 +0100 [thread overview]
Message-ID: <DLSMTVIXW120.3F87OEHJW1LEC@gmail.com> (raw)
In-Reply-To: <CAOLa=ZQ8hvAxpU6SQ-KvN4eK5xMtJh4PoLXfDiNPmG89GQkMYQ@mail.gmail.com>
On Wed Sep 30, 2026 at 11:56 AM WEST, Karthik Nayak wrote:
> Pablo Sabater <pabloosabaterr@gmail.com> writes:
>
>> fetch_object_info() dies when the server does not advertise the
>> object-info capability. That is fine for git cat-file
>> remote-object-info command, which cannot work without it. However
>> a subsequent commit needs fetch_object_info() to not die, to be
>> able to fallback.
>>
>
> Nit: The last sentence reads a little weird, perhaps:
>
> However a subsequent commit uses fetch_object_info() optionally and
> requires it to not die.
>
> Or something?
>
> But I think we should just squash this into the next commit. It doesn't
> really need to standout on its own.
Okay, squashing them makes sense. I only split them to avoid having the
enum buried among the signature changes.
Will fix, thanks.
>
>> Add "enum fetch_object_info_status" so that fetch_object_info() can
>> report this case to its callers. It is used in a subsequent commit.
>>
>> Signed-off-by: Pablo Sabater <pabloosabaterr@gmail.com>
>> ---
>> fetch-object-info.h | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/fetch-object-info.h b/fetch-object-info.h
>> index 2fba96c6f7..663a7f3ae7 100644
>> --- a/fetch-object-info.h
>> +++ b/fetch-object-info.h
>> @@ -16,6 +16,12 @@ struct fetch_object_info_results {
>>
>> #define FETCH_OBJECT_INFO_RESULTS_INIT { 0 }
>>
>> +enum fetch_object_info_status {
>> + FETCH_OBJECT_INFO_OK = 0,
>> + FETCH_OBJECT_INFO_ERR = -1,
>> + FETCH_OBJECT_INFO_NOT_ENABLED = -2,
>> +};
>> +
>> struct oid_array;
>> /*
>> * Sends git-cat-file object-info command into the request buf and reads the
>>
>> --
>> 2.54.0
next prev parent reply other threads:[~2026-09-30 11:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 0:21 [PATCH RFC 0/5] Add --dry-run option to git-backfill(1) Pablo Sabater
2026-09-30 0:21 ` [PATCH RFC 1/5] transport-internal: update fetch_object_info comment Pablo Sabater
2026-09-30 0:21 ` [PATCH RFC 2/5] fetch-object-info: add enum for fetch_object_info() statuses Pablo Sabater
2026-09-30 10:56 ` Karthik Nayak
2026-09-30 11:59 ` Pablo Sabater [this message]
2026-09-30 0:21 ` [PATCH RFC 3/5] fetch-object-info: return a status instead of dying Pablo Sabater
2026-09-30 17:07 ` Junio C Hamano
2026-09-30 18:03 ` Pablo Sabater
2026-09-30 20:01 ` Junio C Hamano
2026-09-30 0:21 ` [PATCH RFC 4/5] backfill: add --dry-run option Pablo Sabater
2026-09-30 11:06 ` Karthik Nayak
2026-09-30 12:19 ` Pablo Sabater
2026-09-30 0:21 ` [PATCH RFC 5/5] backfill: report total size of missing blobs in --dry-run Pablo Sabater
2026-09-30 17:17 ` Junio C Hamano
2026-09-30 18:31 ` Pablo Sabater
2026-09-30 18:14 ` [PATCH RFC 0/5] Add --dry-run option to git-backfill(1) Derrick Stolee
2026-09-30 19:06 ` Pablo Sabater
2026-09-30 20:03 ` Junio C Hamano
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=DLSMTVIXW120.3F87OEHJW1LEC@gmail.com \
--to=pabloosabaterr@gmail.com \
--cc=git@vger.kernel.org \
--cc=karthik.188@gmail.com \
--cc=stolee@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox