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

Re: [PATCH] sha1-file: make pretend_object_file() not prefetch

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 21, 2020, 23:25 UTC
Message-ID
<xmqq8sfc78og.fsf@gitster.c.googlers.com>
In-Reply-To
<20200721225020.1352772-1-jonathantanmy@google.com>
Jonathan Tan <jonathantanmy@google.com> writes:
Show 10 quoted lines
> To make progress towards solving this, I'm thinking of making a new
> function has_object() that takes a repository, an object ID, and flags,
> and only supports one flag: HAS_OBJECT_RECHECK_PACKED (which has the
> opposite meaning of OBJECT_INFO_QUICK). Checks that should not fetch
> should use has_object(), and checks that should fetch (if they exist - I
> think that most would want additional information about the object, so
> they would use oid_object_info() or similar already) should use
> oid_object_info() or a similar function. That way we can see how many
> uses of has_object_file() we have checked, and at the same time make
> behavior we usually want into the default behavior. Any opinions?

Yes, a new function (or a pair of functions) makes it easy to see how much progress we made and also gives us easier greppability.

Previous: Jonathan TanNext: Junio C Hamano
Message 2 of 5 in “sha1-file: make pretend_object_file() not prefetch”
  1. sha1-file: make pretend_object_file() not prefetchJonathan Tan, Jul 21, 2020
  2. Junio C HamanoJul 21, 2020
  3. Junio C HamanoJul 21, 2020
  4. Jeff KingJul 23, 2020
  5. Junio C HamanoJul 23, 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.