Commit 298327f
worktree: refactor
This refactors `repair_worktree_after_gitdir_move()` to use the new
`write_worktree_linking_files` function. It also preserves the
relativity of the linking files; e.g., if an existing worktree used
absolute paths then the repaired paths will be absolute (and visa-versa).
This also adds a test case for reinitializing a repository that has
relative worktrees.
Signed-off-by: Caleb White <[email protected]>
Signed-off-by: Taylor Blau <[email protected]>repair_worktree_after_gitdir_move()
1 parent 30e9e41 commit 298327f
2 files changed
+26
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
437 | 443 | | |
438 | 444 | | |
439 | 445 | | |
| |||
442 | 448 | | |
443 | 449 | | |
444 | 450 | | |
445 | | - | |
446 | | - | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
447 | 461 | | |
448 | 462 | | |
449 | | - | |
450 | | - | |
| 463 | + | |
| 464 | + | |
451 | 465 | | |
452 | 466 | | |
453 | 467 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
656 | | - | |
657 | | - | |
658 | 656 | | |
659 | 657 | | |
660 | | - | |
661 | | - | |
| 658 | + | |
662 | 659 | | |
663 | 660 | | |
664 | 661 | | |
665 | 662 | | |
666 | | - | |
667 | | - | |
| 663 | + | |
668 | 664 | | |
669 | | - | |
| 665 | + | |
670 | 666 | | |
671 | 667 | | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
677 | 672 | | |
678 | 673 | | |
679 | 674 | | |
680 | 675 | | |
681 | 676 | | |
682 | 677 | | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
| 678 | + | |
688 | 679 | | |
689 | | - | |
690 | | - | |
691 | 680 | | |
692 | 681 | | |
693 | | - | |
694 | | - | |
695 | 682 | | |
696 | 683 | | |
697 | 684 | | |
| |||
0 commit comments