Documentation / pack-protocol.txton commit [PATCH] fetch.c: Remove some duplicated code in process() (5de0bff)
   1There are two Pack push-pull protocols.
   2
   3upload-pack (S) | fetch/clone-pack (C) protocol:
   4
   5        # Tell the puller what commits we have and what their names are
   6        S: SHA1 name
   7        S: ...
   8        S: SHA1 name
   9        S: # flush -- it's your turn
  10        # Tell the pusher what commits we want, and what we have
  11        C: want name
  12        C: ..
  13        C: want name
  14        C: have SHA1
  15        C: have SHA1
  16        C: ...
  17        C: # flush -- occasionally ask "had enough?"
  18        S: NAK
  19        C: have SHA1
  20        C: ...
  21        C: have SHA1
  22        S: ACK
  23        C: done
  24        S: XXXXXXX -- packfile contents.
  25
  26send-pack | receive-pack protocol.
  27
  28        # Tell the pusher what commits we have and what their names are
  29        C: SHA1 name
  30        C: ...
  31        C: SHA1 name
  32        C: # flush -- it's your turn
  33        # Tell the puller what the pusher has
  34        S: old-SHA1 new-SHA1 name
  35        S: old-SHA1 new-SHA1 name
  36        S: ...
  37        S: # flush -- done with the list
  38        S: XXXXXXX --- packfile contents.