Commit 059fe16
committed
fix(package): warn if symlinks checked out as plain text files
`cargo package` will warn users when git `core.symlinks` is `false`
and some symlinks were checked out as plain files during packaging.
Git config [`core.symlinks`] defaults to true when unset.
In git-for-windows (and git as well),
the config should be set to false explicitly when the repo was created,
if symlink support wasn't detected [^1].
We assume the config was always set at creation time and never changed.
So, if it is true, we don't bother users with any warning.
[^1]: <https://github.com/git-for-windows/git/blob/f1241afcc7956918d5da33ef74abd9cbba369247/setup.c#L2394-L2403>
[`core.symlinks`]: https://git-scm.com/docs/git-config#Documentation/git-config.txt-coresymlinks1 parent 871b17f commit 059fe16
File tree
3 files changed
+101
-7
lines changed- src/cargo
- ops/cargo_package
- sources
- tests/testsuite
3 files changed
+101
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
114 | 162 | | |
115 | 163 | | |
116 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
410 | | - | |
| 410 | + | |
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
419 | | - | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
420 | 422 | | |
421 | 423 | | |
422 | 424 | | |
| |||
432 | 434 | | |
433 | 435 | | |
434 | 436 | | |
435 | | - | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
436 | 440 | | |
437 | 441 | | |
438 | 442 | | |
| |||
454 | 458 | | |
455 | 459 | | |
456 | 460 | | |
457 | | - | |
| 461 | + | |
458 | 462 | | |
459 | 463 | | |
460 | 464 | | |
| |||
468 | 472 | | |
469 | 473 | | |
470 | 474 | | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
471 | 488 | | |
472 | 489 | | |
473 | 490 | | |
| |||
713 | 730 | | |
714 | 731 | | |
715 | 732 | | |
716 | | - | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
717 | 751 | | |
718 | 752 | | |
719 | 753 | | |
| |||
731 | 765 | | |
732 | 766 | | |
733 | 767 | | |
| 768 | + | |
734 | 769 | | |
735 | 770 | | |
736 | 771 | | |
737 | 772 | | |
738 | 773 | | |
739 | | - | |
| 774 | + | |
740 | 775 | | |
741 | 776 | | |
742 | 777 | | |
| |||
781 | 816 | | |
782 | 817 | | |
783 | 818 | | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
784 | 826 | | |
785 | 827 | | |
786 | | - | |
| 828 | + | |
787 | 829 | | |
788 | 830 | | |
789 | 831 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7077 | 7077 | | |
7078 | 7078 | | |
7079 | 7079 | | |
| 7080 | + | |
| 7081 | + | |
| 7082 | + | |
| 7083 | + | |
7080 | 7084 | | |
7081 | 7085 | | |
7082 | 7086 | | |
| |||
0 commit comments