Git fork

fetch-negotiator: add specific noop initializer

Add a specific initializer for the noop fetch negotiator. This is
introduced to support allowing partial clones to skip commit negotiation
when performing a "refetch".

Signed-off-by: Robert Coup <robert@coup.net.nz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Robert Coup and committed by
Junio C Hamano
18368365 dab1b790

+13
+5
fetch-negotiator.c
··· 23 23 return; 24 24 } 25 25 } 26 + 27 + void fetch_negotiator_init_noop(struct fetch_negotiator *negotiator) 28 + { 29 + noop_negotiator_init(negotiator); 30 + }
+8
fetch-negotiator.h
··· 53 53 void *data; 54 54 }; 55 55 56 + /* 57 + * Initialize a negotiator based on the repository settings. 58 + */ 56 59 void fetch_negotiator_init(struct repository *r, 57 60 struct fetch_negotiator *negotiator); 61 + 62 + /* 63 + * Initialize a noop negotiator. 64 + */ 65 + void fetch_negotiator_init_noop(struct fetch_negotiator *negotiator); 58 66 59 67 #endif