Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

allow non-initial fetch-packs to work

  • Loading branch information...
commit e10bbceb36098eb2b657b292c1a7f3ae68cd60ee 1 parent c77a657
Tom Preston-Werner authored

Showing 2 changed files with 29 additions and 2 deletions. Show diff stats Hide diff stats

  1. +26 1 docs/protocol.txt
  2. +3 1 elibs/server.erl
27 docs/protocol.txt
... ... @@ -1,3 +1,5 @@
  1 +INITIAL CLONE
  2 +
1 3 The client connects and sends the request header. The clone command
2 4
3 5 > git clone git://volcano/mojombo/god.git
@@ -61,4 +63,27 @@ final response:
61 63 ...
62 64 "0037\002Total 2797 (delta 1799), reused 2360 (delta 1529)\n"
63 65 ...
64   -"<\276\255L\273s\005\001w0006\001[0000"
  66 +"<\276\255L\273s\005\001w0006\001[0000"
  67 +
  68 +
  69 +UPDATE
  70 +
  71 +005ewant 1814e8d67376c467ea221f5ed290957fac61cbfc multi_ack side-band-64k thin-pack ofs-delta\n
  72 +00000032have 74730d410fcb6603ace96f1dc55ea6196122532d\n
  73 +0032have 09c409e182256ed9505febccaf323c99b43c55df\n
  74 +0032have d68a13199d99cecc663ad0dda5e24455f3628b65\n
  75 +0032have b3b55b5794e816d1b20e7a6908551f2430d7403f\n
  76 +0032have 4f12e1ceb12a9da7444a4de3572b3288f623276b\n
  77 +0032have 57bd329169794773b962e631d239cf3c8a3ed9de\n
  78 +0032have 4bd501221b1568d769d900f60d36d6c0b264350b\n
  79 +0032have ba98fdce987aa50fe840a2cafd5f1f4e6e0815aa\n
  80 +0032have 582fca91f5dde41339522299835639d82d10a576\n
  81 +0032have 466dbc3416c15c7f968f3012aa23904e157ad50f\n
  82 +0032have 87c194332a77399b96efec701a242a0df16778d8\n
  83 +0032have 15f0ceeef36e49eb51d6efcc7ed4df7b6a03d14f\n
  84 +0032have b69311d226b8569c27f2e0ed641f59eb7b018d1a\n
  85 +0032have 5a3f6be755bbb7deae50065988cbfa1ffa9ab68a\n
  86 +0032have 60487cc2182dd3f0fbc841d7f45afc61ef18ffc5\n
  87 +0032have 7d1665144a3a975c05f1f43902ddaf084e784dbe\n
  88 +0032have 7e47fe2bd8d01d481f44d7af0531bd93d3b21c01\n
  89 +0009done
4 elibs/server.erl
@@ -90,6 +90,7 @@ handle_upload_pack_impl(Sock, Host, Header) ->
90 90 % data completion is denoted by "0000" on it's own line.
91 91 % this is sent back immediately to the client.
92 92 Index = gather_out(Port),
  93 + % io:format("index = ~p~n", [Index]),
93 94 gen_tcp:send(Sock, Index),
94 95
95 96 % once the client receives the index data, it will demand that specific
@@ -130,8 +131,9 @@ gather_demand(Sock) ->
130 131 gather_demand(Sock, DataSoFar) ->
131 132 case gen_tcp:recv(Sock, 0) of
132 133 {ok, Data} ->
  134 + % io:format("data = ~p~n", [Data]),
133 135 TotalData = DataSoFar ++ Data,
134   - case regexp:first_match(TotalData, "\n00000009done\n$") of
  136 + case regexp:first_match(TotalData, "0009done\n$") of
135 137 {match, _Start, _Length} ->
136 138 {ok, TotalData};
137 139 _Else ->

0 comments on commit e10bbce

Please sign in to comment.
Something went wrong with that request. Please try again.