partial clone: promisor fetch during push (pack-objects)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For a partially-cloned repository, push (pack-objects) does a fetch
for missing objects to do delta compression with.

Test-case to reproduce, with annotated output:
https://gist.github.com/rcoup/5593a0627cca52f226580c72743d8e33
(git v2.30.1.602.g966e671106)

My use case is partially-cloning some large repositories with the
majority of the blobs not fetched locally, writing some blobs to
replace some specific paths I don't currently have cloned, committing
& pushing (while leaving most trees as-is). I didn't expect git to
attempt promisor fetches during a push :)

I happened to see it because allowAnySha1InWant wasn't enabled, so it
printed errors but happily continued and completed the push (after a
fetch attempt for each object).

My current workaround is setting `pack.window=0` during push. Looks
from builtin/pack_objects.c:prepare_pack() that `pack.depth=0` should
skip it too, but that didn't seem to work.

Invoking pack-objects directly with any --missing= value still tries
to fetch. And regardless, it carries on if the fetches fail. The
fetches happen at the end of builtin/pack_objects.c:check_object().

1. Feels to me that fetching from a promisor remote is never going to
be quicker than skipping delta compression during a push. Maybe
there's a case for doing it during other pack invocations to minimise
size though?

2. Seems like a bug that check_object() doesn't honour
fetch_if_missing and skip the call to prefetch_to_pack().

3. But push doesn't pass --missing= to pack-objects anyway, so that
wouldn't actually solve the original issue. Should it?

Thanks!
Rob :)



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux