Commit f1f523e
unpack-trees(): ignore worktree check outside checkout area
verify_absent() and verify_uptodate() are used to ensure worktree
is safe to be updated, then CE_REMOVE or CE_UPDATE will be set.
Finally check_updates() bases on CE_REMOVE, CE_UPDATE and the
recently added CE_WT_REMOVE to update working directory accordingly.
The entries that are checked may eventually be left out of checkout
area (done later in apply_sparse_checkout()). We don't want to update
outside checkout area. This patch teaches Git to assume "good",
skip these checks when it's sure those entries will be outside checkout
area, and clear CE_REMOVE|CE_UPDATE that could be set due to this
assumption.
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent e800ec9 commit f1f523e
1 file changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
508 | 516 | | |
509 | 517 | | |
510 | 518 | | |
| |||
577 | 585 | | |
578 | 586 | | |
579 | 587 | | |
| 588 | + | |
| 589 | + | |
580 | 590 | | |
581 | 591 | | |
582 | 592 | | |
| |||
776 | 786 | | |
777 | 787 | | |
778 | 788 | | |
| 789 | + | |
| 790 | + | |
779 | 791 | | |
780 | 792 | | |
781 | 793 | | |
| |||
0 commit comments