Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gummerer <t.gummerer@gmail.com>2019-01-09 00:52:25 +0300
committerJunio C Hamano <gitster@pobox.com>2019-01-09 01:49:28 +0300
commit1495ff7da526c61bff88e31fcdf419fb023a42c5 (patch)
tree96279ea84b691a8b64dcb0989e58f5f54bc556bb /t/t2025-checkout-no-overlay.sh
parent091e04bc8cbb0c89c8112c4784f02a44decc257e (diff)
checkout: introduce checkout.overlayMode config
In the previous patch we introduced a new no-overlay mode for git checkout. Some users (such as the author of this commit) may want to have this mode turned on by default as it matches their mental model more closely. Make that possible by introducing a new config option to that extend. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t2025-checkout-no-overlay.sh')
-rwxr-xr-xt/t2025-checkout-no-overlay.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t2025-checkout-no-overlay.sh b/t/t2025-checkout-no-overlay.sh
index 76330cb5ab..a4912e35cb 100755
--- a/t/t2025-checkout-no-overlay.sh
+++ b/t/t2025-checkout-no-overlay.sh
@@ -44,4 +44,14 @@ test_expect_success '--no-overlay --theirs with D/F conflict deletes file' '
test_path_is_missing file1
'
+test_expect_success 'checkout with checkout.overlayMode=false deletes files not in <tree-ish>' '
+ >file &&
+ mkdir dir &&
+ >dir/file1 &&
+ git add file dir/file1 &&
+ git -c checkout.overlayMode=false checkout HEAD -- file &&
+ test_path_is_missing file &&
+ test_path_is_file dir/file1
+'
+
test_done