#ifndef FETCH_NEGOTIATOR_H #define FETCH_NEGOTIATOR_H struct commit; struct repository; /* * An object that supplies the information needed to negotiate the contents of * the to-be-sent packfile during a fetch. * * To set up the negotiator, call fetch_negotiator_init(), then known_common() * (0 or more times), then add_tip() (0 or more times). * * Then, when "have" lines are required, call next(). Call ack() to report what * the server tells us. * * Once negotiation is done, call release(). The negotiator then cannot be used * (unless reinitialized with fetch_negotiator_init()). */ struct fetch_negotiator { … }; /* * Initialize a negotiator based on the repository settings. */ void fetch_negotiator_init(struct repository *r, struct fetch_negotiator *negotiator); /* * Initialize a noop negotiator. */ void fetch_negotiator_init_noop(struct fetch_negotiator *negotiator); #endif