Skip to content

introduce no-overlay mode in git checkout

Thomas Gummerer git 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest8 patches 12 repliesIn review
  2. v28 patches 6 repliesSuperseded
  3. v18 patches 70 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8move worktree tests to t24*t/t2400-worktree-add.sh t/t2401-worktree-prune.sh t/t2402-worktree-list.sh +2 more+0 -00 replies
2/8entry: factor out unlink_entry functioncache.h entry.c unpack-trees.c+20 -190 replies
3/8entry: support CE_WT_REMOVE flag in checkout_entryentry.c+11 -00 replies
4/8read-cache: add invalidate parameter to remove_marked_cache_entriescache.h read-cache.c split-index.c +1 more+10 -40 replies
5/8checkout: clarify commentbuiltin/checkout.c+4 -40 replies
6/8checkout: factor out mark_cache_entry_for_checkout functionbuiltin/checkout.c+36 -310 replies
7/8checkout: introduce --{,no-}overlay optionDocumentation/git-checkout.txt builtin/checkout.c t/t2025-checkout-no-overlay.sh +1 more+116 -812 replies
8/8checkout: introduce checkout.overlayMode configDocumentation/config/checkout.txt builtin/checkout.c t/t2025-checkout-no-overlay.sh+24 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/8] introduce no-overlay mode in git checkout

Previous rounds are at <[email protected]> and <[email protected]>.

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%)
Signature · 1 line
2.20.1.153.gd81d796ee0