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

approximate_object_count_valid never set?

From
Rasmus Villemoes <rv@rasmusvillemoes.dk>
Date
Sep 17, 2020, 08:20 UTC
Message-ID
<4a018cb9-da40-a98f-a1b9-73be30ae79ec@rasmusvillemoes.dk>
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.

Rasmus
Next: Ævar Arnfjörð Bjarmason
Message 1 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.