From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] read-cache: hide refresh_cache_entry()
Date: Fri, 30 Oct 2026 08:46:33 -0700 [thread overview]
Message-ID: <xmqqpkwrxkbq.fsf@gitster.g> (raw)
In-Reply-To: <auRm0Ohkg3OQIbWE@pks.im> (Patrick Steinhardt's message of "Fri, 30 Oct 2026 10:43:44 +0100")
Patrick Steinhardt <ps@pks.im> writes:
>> Hide the low-level implementation detail again by making it a
>> file-scope static function. The external callers would indirectly
>> call it when they call make_cache_entry() or rename_index_entry_at()
>> external interface, which "ort" (the successor of "recursive") does.
>
> Seeing all these patches dropping public declarations I wonder whether
> they should have been part of the same patch series :)
Perhaps ;-).
>> +static struct cache_entry *refresh_cache_entry(struct index_state *, struct cache_entry *, unsigned int);
>> +
>> static const char *alternate_index_output;
>>
>> static void set_index_entry(struct index_state *istate, int nr, struct cache_entry *ce)
>
> Could we avoid this forward declaration by moving the function around?
As refresh_cache_entry() that has mere one line in its body calls
refresh_cache_ent() that is a screenful and defined nearby, both of
them need to be moved upward, so it becomes a rather unsightly
change, even though nobody would care when they only look at the end
result X-<.
By the way, I tried "history fixup" to make this change, and noticed
that the subcommand ignores "[notes] rewriteref = refs/notes/amlog",
just like "git history reword" does. Again, I wonder if this is a
known limitation, or a deliberate design.
prev parent reply other threads:[~2026-10-30 15:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 20:34 [PATCH] read-cache: hide refresh_cache_entry() Junio C Hamano
2026-10-30 9:43 ` Patrick Steinhardt
2026-10-30 15:46 ` Junio C Hamano [this message]
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=xmqqpkwrxkbq.fsf@gitster.g \
--to=gitster@pobox.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