@@ -335,7 +335,6 @@ server advertises capability `allow-tip-sha1-in-want`.
335
335
have_list = *PKT-LINE("have" SP id LF)
336
336
337
337
TODO: Document this further.
338
- TODO: Don't use uppercase for variable names below.
339
338
340
339
The Negotiation Algorithm
341
340
~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -346,15 +345,15 @@ The computation to select the minimal pack proceeds as follows
346
345
347
346
C: Use ref discovery to obtain the advertised refs.
348
347
349
- C: Place any object seen into set ADVERTISED .
348
+ C: Place any object seen into set `advertised` .
350
349
351
- C: Build an empty set, COMMON , to hold the objects that are later
350
+ C: Build an empty set, `common` , to hold the objects that are later
352
351
determined to be on both ends.
353
352
354
- C: Build a set, WANT , of the objects from ADVERTISED the client
353
+ C: Build a set, `want` , of the objects from `advertised` the client
355
354
wants to fetch, based on what it saw during ref discovery.
356
355
357
- C: Start a queue, C_PENDING , ordered by commit time (popping newest
356
+ C: Start a queue, `c_pending` , ordered by commit time (popping newest
358
357
first). Add all client refs. When a commit is popped from
359
358
the queue its parents SHOULD be automatically inserted back.
360
359
Commits MUST only enter the queue once.
@@ -363,14 +362,14 @@ C: Start a queue, C_PENDING, ordered by commit time (popping newest
363
362
364
363
C: Send one `$GIT_URL/git-upload-pack` request:
365
364
366
- C: 0032want <WANT #1>...............................
367
- C: 0032want <WANT #2>...............................
365
+ C: 0032want <want #1>...............................
366
+ C: 0032want <want #2>...............................
368
367
....
369
- C: 0032have <COMMON #1>.............................
370
- C: 0032have <COMMON #2>.............................
368
+ C: 0032have <common #1>.............................
369
+ C: 0032have <common #2>.............................
371
370
....
372
- C: 0032have <HAVE #1>...............................
373
- C: 0032have <HAVE #2>...............................
371
+ C: 0032have <have #1>...............................
372
+ C: 0032have <have #2>...............................
374
373
....
375
374
C: 0000
376
375
@@ -393,38 +392,38 @@ A single "want" or "have" command MUST have one hex formatted
393
392
SHA-1 as its value. Multiple SHA-1s MUST be sent by sending
394
393
multiple commands.
395
394
396
- The HAVE list is created by popping the first 32 commits
397
- from C_PENDING . Less can be supplied if C_PENDING empties.
395
+ The `have` list is created by popping the first 32 commits
396
+ from `c_pending` . Less can be supplied if `c_pending` empties.
398
397
399
- If the client has sent 256 HAVE commits and has not yet
400
- received one of those back from S_COMMON , or the client has
401
- emptied C_PENDING it SHOULD include a "done" command to let
398
+ If the client has sent 256 "have" commits and has not yet
399
+ received one of those back from `s_common` , or the client has
400
+ emptied `c_pending` it SHOULD include a "done" command to let
402
401
the server know it won't proceed:
403
402
404
403
C: 0009done
405
404
406
405
S: Parse the git-upload-pack request:
407
406
408
- Verify all objects in WANT are directly reachable from refs.
407
+ Verify all objects in `want` are directly reachable from refs.
409
408
410
409
The server MAY walk backwards through history or through
411
410
the reflog to permit slightly stale requests.
412
411
413
- If no WANT objects are received, send an error:
412
+ If no "want" objects are received, send an error:
414
413
TODO: Define error if no "want" lines are requested.
415
414
416
- If any WANT object is not reachable, send an error:
415
+ If any "want" object is not reachable, send an error:
417
416
TODO: Define error if an invalid "want" is requested.
418
417
419
- Create an empty list, S_COMMON .
418
+ Create an empty list, `s_common` .
420
419
421
420
If "have" was sent:
422
421
423
422
Loop through the objects in the order supplied by the client.
424
423
425
424
For each object, if the server has the object reachable from
426
- a ref, add it to S_COMMON . If a commit is added to S_COMMON ,
427
- do not add any ancestors, even if they also appear in HAVE .
425
+ a ref, add it to `s_common` . If a commit is added to `s_common` ,
426
+ do not add any ancestors, even if they also appear in `have` .
428
427
429
428
S: Send the git-upload-pack response:
430
429
@@ -440,7 +439,7 @@ stream 1. Progress messages from the server side MAY appear
440
439
in stream 2.
441
440
442
441
Here a "closed set of objects" is defined to have at least
443
- one path from every WANT to at least one COMMON object.
442
+ one path from every "want" to at least one "common" object.
444
443
445
444
If the server needs more information, it replies with a
446
445
status continue response:
0 commit comments