Merge branch 'jt/fetch-no-update-shallow-in-proto-v2'

Fix for protocol v2 support in "git fetch-pack" of shallow clones.

* jt/fetch-no-update-shallow-in-proto-v2:
  fetch-pack: respect --no-update-shallow in v2
  fetch-pack: call prepare_shallow_info only if v0
This commit is contained in:
Junio C Hamano
2019-04-25 16:41:16 +09:00
2 changed files with 45 additions and 10 deletions

View File

@ -263,6 +263,10 @@ extern void setup_alternate_shallow(struct lock_file *shallow_lock,
extern const char *setup_temporary_shallow(const struct oid_array *extra);
extern void advertise_shallow_grafts(int);
/*
* Initialize with prepare_shallow_info() or zero-initialize (equivalent to
* prepare_shallow_info with a NULL oid_array).
*/
struct shallow_info {
struct oid_array *shallow;
int *ours, nr_ours;