]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/checkout.c
restore: disable overlay mode by default
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Thu, 25 Apr 2019 09:45:48 +0000 (16:45 +0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 7 May 2019 04:04:47 +0000 (13:04 +0900)
commita6cfb9ba360d975dd38b2e6e77a88d2c8fe8d323
treeec98c7c7a3451983fbc9c00e54e1bab4064923a2
parentbe8ed5022b84fa75c24f24bbf64bb5ad6652c64f
restore: disable overlay mode by default

Overlay mode is considered confusing when the command is about
restoring files on worktree. Disable it by default. The user can still
turn it on, or use 'git checkout' which still has overlay mode on by
default.

While at it, make the check in checkout_branch() stricter. Neither
--overlay or --no-overlay should be accepted in branch switching mode.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/checkout.c