Skip to content

No-lazy-fetch has_object() and some fixes

Jonathan Tan git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest4 patches 1 replyIn review

Changes in v2 from the cover letter

- Patch split into 2 (patch 1 and patch 2)
- 2 additional patches that fix bugs by making use of the new function

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4sha1-file: introduce no-lazy-fetch has_object()object-store.h sha1-file.c+35 -20 replies
2/4apply: do not lazy fetch when applying binaryapply.c t/t4150-am.sh+17 -10 replies
3/4pack-objects: no fetch when allow-{any,promisor}Documentation/git-pack-objects.txt builtin/pack-objects.c+9 -60 replies
4/4fsck: do not lazy fetch known non-promisor objectbuiltin/fsck.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

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

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()).

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(-)
Signature · 1 line
2.28.0.236.gb10cc79966-goog