Previous rounds are at <20181209200449.16342-1-t.gummerer@xxxxxxxxx> and <20181220134820.21810-1-t.gummerer@xxxxxxxxx>. Thanks Duy, Eric and Junio for comments on the previous round. This round fixes some inconsistencies and improves the grammar in the docs. Range-diff below: 1: fa450cda7c = 1: fa450cda7c move worktree tests to t24* 2: 9ada8d3484 = 2: 9ada8d3484 entry: factor out unlink_entry function 3: 41c0ea4047 = 3: 41c0ea4047 entry: support CE_WT_REMOVE flag in checkout_entry 4: afccb0848d = 4: afccb0848d read-cache: add invalidate parameter to remove_marked_cache_entries 5: 8a2b5efdad = 5: 8a2b5efdad checkout: clarify comment 6: c405f20471 = 6: c405f20471 checkout: factor out mark_cache_entry_for_checkout function 7: e5b18bcd02 ! 7: a291dc78fa checkout: introduce --{,no-}overlay option @@ -35,7 +35,7 @@ section of linkgit:git-add[1] to learn how to operate the `--patch` mode. ++ +Note that this option uses the no overlay mode by default (see also -+-`--[no-]overlay`), and currently doesn't support overlay mode. ++`--[no-]overlay`), and currently doesn't support overlay mode. --ignore-other-worktrees:: `git checkout` refuses when the wanted ref is already checked @@ -44,9 +44,9 @@ submodules HEAD. +--[no-]overlay:: -+ In the default overlay mode files `git checkout` never ++ In the default overlay mode, `git checkout` never + removes files from the index or the working tree. When -+ specifying --no-overlay, files that appear in the index and ++ specifying `--no-overlay`, files that appear in the index and + working tree, but not in <tree-ish> are removed, to make them + match <tree-ish> exactly. + 8: de24990d57 ! 8: 8d4070f142 checkout: introduce checkout.overlayMode config @@ -19,9 +19,9 @@ settings nor will it show the local changes. + +checkout.overlayMode:: -+ In the default overlay mode files `git checkout` never ++ In the default overlay mode, `git checkout` never + removes files from the index or the working tree. When -+ setting checkout.overlayMode to false, files that appear in ++ setting `checkout.overlayMode` to false, files that appear in + the index and working tree, but not in <tree-ish> are removed, + to make them match <tree-ish> exactly. Thomas Gummerer (8): move worktree tests to t24* entry: factor out unlink_entry function entry: support CE_WT_REMOVE flag in checkout_entry read-cache: add invalidate parameter to remove_marked_cache_entries checkout: clarify comment checkout: factor out mark_cache_entry_for_checkout function checkout: introduce --{,no-}overlay option checkout: introduce checkout.overlayMode config Documentation/config/checkout.txt | 7 + Documentation/git-checkout.txt | 10 ++ builtin/checkout.c | 133 +++++++++++++----- cache.h | 7 +- entry.c | 26 ++++ read-cache.c | 8 +- split-index.c | 2 +- t/t2025-checkout-no-overlay.sh | 57 ++++++++ ...-worktree-add.sh => t2400-worktree-add.sh} | 0 ...ktree-prune.sh => t2401-worktree-prune.sh} | 0 ...orktree-list.sh => t2402-worktree-list.sh} | 0 ...orktree-move.sh => t2403-worktree-move.sh} | 0 ...ree-config.sh => t2404-worktree-config.sh} | 0 t/t9902-completion.sh | 1 + unpack-trees.c | 21 +-- 15 files changed, 213 insertions(+), 59 deletions(-) create mode 100755 t/t2025-checkout-no-overlay.sh rename t/{t2025-worktree-add.sh => t2400-worktree-add.sh} (100%) rename t/{t2026-worktree-prune.sh => t2401-worktree-prune.sh} (100%) rename t/{t2027-worktree-list.sh => t2402-worktree-list.sh} (100%) rename t/{t2028-worktree-move.sh => t2403-worktree-move.sh} (100%) rename t/{t2029-worktree-config.sh => t2404-worktree-config.sh} (100%) -- 2.20.1.153.gd81d796ee0