diff options
| author | Thomas Gummerer <t.gummerer@gmail.com> | 2019-01-08 21:52:25 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2019-01-08 14:49:28 -0800 |
| commit | 1495ff7da526c61bff88e31fcdf419fb023a42c5 (patch) | |
| tree | 96279ea84b691a8b64dcb0989e58f5f54bc556bb /builtin/checkout.c | |
| parent | checkout: introduce --{,no-}overlay option (diff) | |
| download | git-1495ff7da526c61bff88e31fcdf419fb023a42c5.tar.gz git-1495ff7da526c61bff88e31fcdf419fb023a42c5.zip | |
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 'builtin/checkout.c')
| -rw-r--r-- | builtin/checkout.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c index 0c5fe948ef..b5dfc45736 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -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; } |
