git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: approximate_object_count_valid never set?

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Sep 17, 2020, 11:58 UTC
Message-ID
<87pn6khay1.fsf@evledraar.gmail.com>
In-Reply-To
<4a018cb9-da40-a98f-a1b9-73be30ae79ec@rasmusvillemoes.dk>
On Thu, Sep 17 2020, Rasmus Villemoes wrote:
Show 12 quoted lines
> Hi,
>
> While poking around the code, I noticed that it seems
> ->approximate_object_count_valid is never set to 1, and it never has
> been, not even back when it was a global variable. So perhaps it can
> just be removed and the logic depending on it simplified? Or am I
> missing some preprocessor trickery.
>
> Nobody seems to have noticed the lack of caching - and actually setting
> it to 1 after the count has been computed might be a little dangerous
> unless one takes care to invalidate the cache anywhere that might be
> relevant.

There's some previous discussion about this in https://public-inbox.org/git/20180226085508.GA30343@sigill.intra.peff.net/

Previous: Rasmus VillemoesNext: Jeff King
Message 2 of 6 in “approximate_object_count_valid never set?”
  1. Rasmus VillemoesSep 17, 2020
  2. Ævar Arnfjörð BjarmasonSep 17, 2020
  3. Jeff KingSep 17, 2020
  4. packfile: actually set approximate_object_count_validJeff King, Sep 17, 2020
  5. Taylor BlauSep 17, 2020
  6. Junio C HamanoSep 17, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.