Skip to content

Avoiding errors when partial cloning a tagged blob

Jonathan Tan git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2upload-pack: send refs' objects despite "filter"Documentation/technical/pack-protocol.txt list-objects.c object.h +4 more+42 -60 replies
2/2clone: check connectivity even if clone is partialbuiltin/clone.c t/t5616-partial-clone.sh+49 -10 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/2] Avoiding errors when partial cloning a tagged blob

When cloning a repository with a tagged blob (like the Git repository) with --filter=blob:none, the following message appears:

error: missing object referenced by 'refs/tags/junio-gpg-pub'

and the resulting repository also fails fsck.

Patch 1 fixes the protocol documentation and the server side of Git, and patch 2 makes clone error out when such a situation occurs.

An argument could be made that we should not merge patch 2 just yet due to the fact that some server implementations (such as Git and JGit) still exhibit the old behavior, and the resulting clones (albeit failing fsck) are still usable, because when attempting to load the blob, Git will automatically fetch it. I'm on the fence about this, and have included patch 2 in this patch set nevertheless for completeness.

Jonathan Tan (2):
upload-pack: send refs' objects despite "filter"
clone: check connectivity even if clone is partial

 Documentation/technical/pack-protocol.txt |  4 +-
 builtin/clone.c                           |  2 +-
 list-objects.c                            |  6 +--
 object.h                                  |  2 +-
 revision.c                                |  1 +
 revision.h                                |  3 +-
 t/t5317-pack-objects-filter-objects.sh    | 16 ++++++
 t/t5616-partial-clone.sh                  | 64 +++++++++++++++++++++++
 8 files changed, 91 insertions(+), 7 deletions(-)
Signature · 1 line
2.18.0.203.gfac676dfb9-goog