Commit a7e0e44
authored
Revert "fix(package): detect dirtiness for symlinks to submodule" (#15419)
### What does this PR try to resolve?
This reverts commit 71ea2e5.
`Repository::discover` and `Repository::status_file` are too expenstive
to run inside a loop. And `cargo package` are doing a lot of duplicate
works for checking submodule VCS status.
Alternative fixes might look like
* Let `status_submodules` function returns a path entry set, so
Cargo can check whether a source file is dirty based on that.
* When listing files in `PathSource`, attach the VCS status of a
path entry assoicated with. Then subsequent operations can skip
status check entirely.
However, the above solutions are not trivial, and the dirtiness check is
informational only based on T-cargo conclusion, so we should be
good just reverting the change now.
Again, the caveat of this is that we can't really detect
dirty symlinks that link into a Git submodule.
### How should we test and review this PR?
Should be good to merge. We still got #15384 fixed via
d760263
### Additional information
See
<#15384 (comment)>.File tree
2 files changed
+5
-27
lines changed- src/cargo/ops/cargo_package
- tests/testsuite
2 files changed
+5
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | 277 | | |
298 | | - | |
| 278 | + | |
| 279 | + | |
299 | 280 | | |
300 | 281 | | |
301 | 282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1463 | 1463 | | |
1464 | 1464 | | |
1465 | 1465 | | |
| 1466 | + | |
1466 | 1467 | | |
1467 | 1468 | | |
1468 | 1469 | | |
1469 | | - | |
1470 | 1470 | | |
1471 | | - | |
1472 | | - | |
1473 | | - | |
1474 | | - | |
1475 | | - | |
| 1471 | + | |
| 1472 | + | |
1476 | 1473 | | |
1477 | 1474 | | |
1478 | 1475 | | |
| |||
0 commit comments