Commit c33d6d2
committed
Auto merge of #12244 - krs98:fix-relative-git-submodules, r=weihanglo
fix: git submodules with relative urls
### What does this PR try to resolve?
Fixes #12151.
When recursing submodules, the url of the parent remote was being passed to `update_submodules` instead of the child remote url. This caused Cargo to try to add the wrong submodule.
### How should we test and review this PR?
A test case is added in the first commit. The second one renames the `url` variable as suggested in the issue. The third includes the changes to fix the issue. The last one includes a minor refactor where a redundant `match` expr is removed.2 files changed
+87
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
447 | | - | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
448 | 450 | | |
449 | 451 | | |
450 | 452 | | |
| |||
453 | 455 | | |
454 | 456 | | |
455 | 457 | | |
456 | | - | |
457 | | - | |
458 | | - | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
459 | 467 | | |
460 | | - | |
461 | | - | |
| 468 | + | |
462 | 469 | | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
| 470 | + | |
467 | 471 | | |
468 | 472 | | |
469 | 473 | | |
| |||
484 | 488 | | |
485 | 489 | | |
486 | 490 | | |
487 | | - | |
| 491 | + | |
488 | 492 | | |
489 | 493 | | |
490 | 494 | | |
| |||
498 | 502 | | |
499 | 503 | | |
500 | 504 | | |
501 | | - | |
| 505 | + | |
502 | 506 | | |
503 | 507 | | |
504 | | - | |
| 508 | + | |
505 | 509 | | |
506 | 510 | | |
507 | 511 | | |
| |||
510 | 514 | | |
511 | 515 | | |
512 | 516 | | |
513 | | - | |
| 517 | + | |
514 | 518 | | |
515 | 519 | | |
516 | 520 | | |
517 | 521 | | |
518 | 522 | | |
519 | | - | |
| 523 | + | |
520 | 524 | | |
521 | 525 | | |
522 | 526 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3619 | 3619 | | |
3620 | 3620 | | |
3621 | 3621 | | |
| 3622 | + | |
| 3623 | + | |
| 3624 | + | |
| 3625 | + | |
| 3626 | + | |
| 3627 | + | |
| 3628 | + | |
| 3629 | + | |
| 3630 | + | |
| 3631 | + | |
| 3632 | + | |
| 3633 | + | |
| 3634 | + | |
| 3635 | + | |
| 3636 | + | |
| 3637 | + | |
| 3638 | + | |
| 3639 | + | |
| 3640 | + | |
| 3641 | + | |
| 3642 | + | |
| 3643 | + | |
| 3644 | + | |
| 3645 | + | |
| 3646 | + | |
| 3647 | + | |
| 3648 | + | |
| 3649 | + | |
| 3650 | + | |
| 3651 | + | |
| 3652 | + | |
| 3653 | + | |
| 3654 | + | |
| 3655 | + | |
| 3656 | + | |
| 3657 | + | |
| 3658 | + | |
| 3659 | + | |
| 3660 | + | |
| 3661 | + | |
| 3662 | + | |
| 3663 | + | |
| 3664 | + | |
| 3665 | + | |
| 3666 | + | |
| 3667 | + | |
| 3668 | + | |
| 3669 | + | |
| 3670 | + | |
| 3671 | + | |
| 3672 | + | |
| 3673 | + | |
| 3674 | + | |
| 3675 | + | |
| 3676 | + | |
| 3677 | + | |
| 3678 | + | |
| 3679 | + | |
| 3680 | + | |
| 3681 | + | |
| 3682 | + | |
| 3683 | + | |
| 3684 | + | |
| 3685 | + | |
| 3686 | + | |
| 3687 | + | |
| 3688 | + | |
| 3689 | + | |
0 commit comments