From: Junio C Hamano <gitster@pobox.com>
To: Toon Claes <toon@iotcl.com>
Cc: Patrick Steinhardt <ps@pks.im>, git@vger.kernel.org
Subject: Re: [PATCH 3/6] packfile: inline `open_packed_git_1()`
Date: Thu, 26 Nov 2026 12:39:12 -0800 [thread overview]
Message-ID: <xmqqmrqviaz3.fsf@gitster.g> (raw)
In-Reply-To: <87bj7bsmoh.fsf@dev.null.iotcl.com.invalid> (Toon Claes's message of "Thu, 26 Nov 2026 15:16:14 +0100")
Toon Claes <toon@iotcl.com> writes:
> Patrick Steinhardt <ps@pks.im> writes:
>
>> The function `open_packed_git()` is responsible for opening a packfile.
>> The majority of work is not performed by it though, but instead by its
>> `_1()` sibling. But this sibling really only exists because we thought
>> it too hard to handle errors properly and close the packfile's file
>
> Is this missing an "'s" after the "it"?
Both of these are grammatically correct.
We thought it too hard to handle ...
We thought it was too hard to handle ...
On the other hand, this is not entirely grammatical
We thought it is too hard to handle ...
because the reporting verb (thought) is in the past tense, so the verb
in the subordinate clause (it is hard) is backshifted to the past tense.
This is true even if the difficulty is still true today.
Your suggestion to add "'s" after "it" makes
We thought it's too hard to handle ...
which is a contracted form of "it is too hard" in the present tense.
>> @@ -492,9 +488,12 @@ static int open_packed_git_1(struct packed_git *p)
>> unsigned char *idx_hash;
>> ssize_t read_result;
>> const unsigned hashsz = p->repo->hash_algo->rawsz;
>> + int ret;
>>
>> - if (packfile_open_index(p))
>> - return error("packfile %s index unavailable", p->pack_name);
>> + if (packfile_open_index(p)) {
>> + ret = error("packfile %s index unavailable", p->pack_name);
>
> Not sure if it should be part of this series, but should we make the
> messages localizable?
The file is in a sad state. There are a handful of _("localizable")
messages given to die or die_errno, but almost all others messages,
mostly given to error but some to die, are not. It is clear that it is
outside the scope of this series to decide if we want to make them fully
localizable and do so if the decision is made, but as a measure to avoid
making it worse, it is dubious we want to make these new messages
localizable.
>> + if (hdr.hdr_signature != htonl(PACK_SIGNATURE)) {
>> + ret = error("file %s is not a GIT packfile", p->pack_name);
>
> I'm surprised "Git" is spelled out in caps here.
I am too. Thanks for the sharp eyes. As the name of a system we might
call ours 'G' 'i' 't' but not in all caps. As a common data interchange
format to be used among compatible (re)implementations, "a Git packfile"
might be fairer phrasing than "a git packfile", but I dunno.
next prev parent reply other threads:[~2026-11-26 20:39 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 12:02 [PATCH 0/6] packfile: some lifecycle improvements Patrick Steinhardt
2026-11-20 12:02 ` [PATCH 1/6] builtin/fast-import: stop reporting packfile statistics Patrick Steinhardt
2026-11-24 20:43 ` Junio C Hamano
2026-11-24 22:19 ` brian m. carlson
2026-11-26 14:15 ` Toon Claes
2026-11-20 12:02 ` [PATCH 2/6] packfile: rename lifecycle functions Patrick Steinhardt
2026-11-24 23:47 ` Junio C Hamano
2026-11-26 14:16 ` Toon Claes
2026-11-20 12:02 ` [PATCH 3/6] packfile: inline `open_packed_git_1()` Patrick Steinhardt
2026-11-24 22:04 ` Junio C Hamano
2026-11-26 14:16 ` Toon Claes
2026-11-26 14:16 ` Toon Claes
2026-11-26 20:39 ` Junio C Hamano [this message]
2026-11-20 12:02 ` [PATCH 4/6] packfile: introduce function to free a packfile Patrick Steinhardt
2026-11-24 21:34 ` Junio C Hamano
2026-11-26 14:13 ` Toon Claes
2026-11-26 20:41 ` Junio C Hamano
2026-11-20 12:02 ` [PATCH 5/6] packfile: maintain process-wide limits globally Patrick Steinhardt
2026-11-24 23:24 ` Junio C Hamano
2026-11-26 15:11 ` Toon Claes
2026-11-20 12:02 ` [PATCH 6/6] packfile: skip closing packs marked as do-not-close Patrick Steinhardt
2026-11-24 21:14 ` Junio C Hamano
2026-11-26 15:26 ` Toon Claes
2026-11-26 19:56 ` Junio C Hamano
2026-11-26 15:29 ` [PATCH 0/6] packfile: some lifecycle improvements Toon Claes
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=xmqqmrqviaz3.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
--cc=toon@iotcl.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