Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/negotiator/noop.c # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / negotiator / noop.c` 52 lines ยท 1176 bytes Raw Blame History 1 #include "git-compat-util.h" 2 #include "noop.h" 3 #include "../fetch-negotiator.h" 4 5 static void known_common(struct fetch_negotiator *n UNUSED, 6 struct commit *c UNUSED) 7 { 8 /* do nothing */ 9 } 10 11 static void add_tip(struct fetch_negotiator *n UNUSED, 12 struct commit *c UNUSED) 13 { 14 /* do nothing */ 15 } 16 17 static const struct object_id *next(struct fetch_negotiator *n UNUSED) 18 { 19 return NULL; 20 } 21 22 static int ack(struct fetch_negotiator *n UNUSED, struct commit *c UNUSED) 23 { 24 /* 25 * This negotiator does not emit any commits, so there is no commit to 26 * be acknowledged. If there is any ack, there is a bug. 27 */ 28 BUG("ack with noop negotiator, which does not emit any commits"); 29 return 0; 30 } 31 32 static void have_sent(struct fetch_negotiator *n UNUSED, 33 struct commit *c UNUSED) 34 { 35 /* nothing to do */ 36 } 37 38 static void release(struct fetch_negotiator *n UNUSED) 39 { 40 /* nothing to release */ 41 } 42 43 void noop_negotiator_init(struct fetch_negotiator *negotiator) 44 { 45 negotiator->known_common = known_common; 46 negotiator->add_tip = add_tip; 47 negotiator->next = next; 48 negotiator->ack = ack; 49 negotiator->have_sent = have_sent; 50 negotiator->release = release; 51 negotiator->data = NULL; 52 }