Commit 5056cf4
upload-pack: teach deepen-relative in protocol v2
Commit 685fbd3 ("fetch-pack: perform a fetch using v2", 2018-03-15)
attempted to teach Git deepen-relative in protocol v2 (among other
things), but it didn't work:
(1) fetch-pack.c needs to emit "deepen-relative".
(2) upload-pack.c needs to ensure that the correct deepen_relative
variable is passed to deepen() (there are two - the static variable
and the one in struct upload_pack_data).
(3) Before deepen() computes the list of reachable shallows, it first
needs to mark all "our" refs as OUR_REF. v2 currently does not do
this, because unlike v0, it is not needed otherwise.
Fix all this and include a test demonstrating that it works now. For
(2), the static variable deepen_relative is also eliminated, removing a
source of confusion.
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Reviewed-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent bd0b42a commit 5056cf4
3 files changed
+46
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1007 | 1007 | | |
1008 | 1008 | | |
1009 | 1009 | | |
| 1010 | + | |
| 1011 | + | |
1010 | 1012 | | |
1011 | 1013 | | |
1012 | 1014 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
492 | 521 | | |
493 | 522 | | |
494 | 523 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
662 | 661 | | |
663 | 662 | | |
664 | 663 | | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
665 | 667 | | |
666 | 668 | | |
667 | 669 | | |
| |||
676 | 678 | | |
677 | 679 | | |
678 | 680 | | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
679 | 688 | | |
680 | 689 | | |
681 | 690 | | |
| |||
712 | 721 | | |
713 | 722 | | |
714 | 723 | | |
| 724 | + | |
715 | 725 | | |
716 | 726 | | |
717 | 727 | | |
| |||
834 | 844 | | |
835 | 845 | | |
836 | 846 | | |
| 847 | + | |
837 | 848 | | |
838 | 849 | | |
839 | 850 | | |
| |||
925 | 936 | | |
926 | 937 | | |
927 | 938 | | |
928 | | - | |
| 939 | + | |
| 940 | + | |
929 | 941 | | |
930 | 942 | | |
931 | 943 | | |
| |||
1398 | 1410 | | |
1399 | 1411 | | |
1400 | 1412 | | |
| 1413 | + | |
1401 | 1414 | | |
1402 | 1415 | | |
1403 | 1416 | | |
| |||
0 commit comments