negotiator/noop: add noop fetch negotiator

Add a noop fetch negotiator. This is introduced to allow partial clones
to skip the unneeded negotiation step when fetching missing objects
using a "git fetch" subprocess. (The implementation of spawning a "git
fetch" subprocess will be done in a subsequent patch.) But this can also
be useful for end users, e.g. as a blunt fix for object corruption.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jonathan Tan
2020-08-17 21:01:31 -07:00
committed by Junio C Hamano
parent 887952b8c6
commit cbe566a071
8 changed files with 87 additions and 1 deletions

View File

@ -23,6 +23,7 @@ enum fetch_negotiation_setting {
FETCH_NEGOTIATION_NONE = 0,
FETCH_NEGOTIATION_DEFAULT = 1,
FETCH_NEGOTIATION_SKIPPING = 2,
FETCH_NEGOTIATION_NOOP = 3,
};
struct repo_settings {