My investigation in lowering connectivity check cost in git-clone [1]
led me to try 'index-pack --strict' code. Without calling fsck_object(),
--strict seems to be cheaper than check_everything_connected() while
accomplishing the same thing (imo).

The first patch is a bug fix running git-clone --depth with
fetch.fsckObjects on. The second is "fix while i'm there". The third
introduces check_everything_connected alternative. The fourth makes
use of it.

The last use of check_everything_connected after this series is
fetch.c:quickfetch(), which I think is unnecessary. It can only catch
errors if we have incomplete object islands in repo, which could
happen before this series. After this series, incomplete object
islands can't enter the repository, at least via git transport. So
maybe we should remove that check_everything_connected too (maybe
after a few years, enough time for the laziest user to run fsck/repack


Nguyễn Thái Ngọc Duy (4):
  fetch-pack: save shallow file before fetching the pack
  index-pack: remove dead code (it should never happen)
  index-pack, unpack-objects: add --not-so-strict for connectivity check
  Use --not-so-strict on all pack transfer for connectivity check

 builtin/fetch.c                 |  6 ----
 builtin/index-pack.c            | 10 ++++--
 builtin/receive-pack.c          | 22 +++----------
 builtin/unpack-objects.c        |  9 ++++--
 fetch-pack.c                    | 72 +++++++++++++++++++++++------------------
 t/           |  7 ++++
 t/ |  2 +-
 7 files changed, 66 insertions(+), 62 deletions(-)


To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to