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>
This commit is contained in:

committed by
Junio C Hamano

parent
091e04bc8c
commit
1495ff7da5
@ -1019,13 +1019,19 @@ static int switch_branches(const struct checkout_opts *opts,
|
||||
|
||||
static int git_checkout_config(const char *var, const char *value, void *cb)
|
||||
{
|
||||
struct checkout_opts *opts = cb;
|
||||
|
||||
if (!strcmp(var, "checkout.optimizenewbranch")) {
|
||||
checkout_optimize_new_branch = git_config_bool(var, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strcmp(var, "checkout.overlaymode")) {
|
||||
opts->overlay_mode = git_config_bool(var, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strcmp(var, "diff.ignoresubmodules")) {
|
||||
struct checkout_opts *opts = cb;
|
||||
handle_ignore_submodules_arg(&opts->diff_options, value);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user