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

Re: [PATCH v2 0/4] No-lazy-fetch has_object() and some fixes

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 6, 2020, 20:00 UTC
Message-ID
<xmqqwo2bk0ib.fsf@gitster.c.googlers.com>
In-Reply-To
<cover.1596668156.git.jonathantanmy@google.com>
Jonathan Tan <jonathantanmy@google.com> writes:
Show 6 quoted lines
> Since v1, I've took a look at 3 other cases that use has_object_file():
> 2 don't need lazy-fetching (patches 3 and 4 in this set) and 1 does -
> "cat-file -e" - although I think this is a special case. So I still
> think that not lazy-fetching when checking object existence is more
> likely, and should be privileged with the shorter function name
> (has_object() instead of has_object_locally()).
Thanks.  has_object then.
Show 19 quoted lines
>
> Changes from v1:
>  - Patch split into 2 (patch 1 and patch 2)
>  - 2 additional patches that fix bugs by making use of the new function
>
> Jonathan Tan (4):
>   sha1-file: introduce no-lazy-fetch has_object()
>   apply: do not lazy fetch when applying binary
>   pack-objects: no fetch when allow-{any,promisor}
>   fsck: do not lazy fetch known non-promisor object
>
>  Documentation/git-pack-objects.txt | 11 +++++++----
>  apply.c                            |  2 +-
>  builtin/fsck.c                     |  2 +-
>  builtin/pack-objects.c             |  4 ++--
>  object-store.h                     | 25 +++++++++++++++++++++++--
>  sha1-file.c                        | 12 ++++++++++++
>  t/t4150-am.sh                      | 16 ++++++++++++++++
>  7 files changed, 62 insertions(+), 10 deletions(-)
Previous: Jonathan Tan
Message 9 of 9 in “apply: do not fetch when checking object existence”
  1. apply: do not fetch when checking object existenceJonathan Tan, Jul 28, 2020
  2. Junio C HamanoJul 28, 2020
  3. Jonathan TanJul 28, 2020
  4. 0/4 No-lazy-fetch has_object() and some fixesJonathan Tan, Aug 5, 2020
  5. 1/4 sha1-file: introduce no-lazy-fetch has_object()Jonathan Tan, Aug 5, 2020
  6. 3/4 pack-objects: no fetch when allow-{any,promisor}Jonathan Tan, Aug 5, 2020
  7. 4/4 fsck: do not lazy fetch known non-promisor objectJonathan Tan, Aug 5, 2020
  8. 2/4 apply: do not lazy fetch when applying binaryJonathan Tan, Aug 5, 2020
  9. Junio C HamanoAug 6, 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.