]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/checkout.c
checkout: learn to respect checkout.guess
[thirdparty/git.git] / builtin / checkout.c
index 0951f8fee5cc2a88ac9e08009a69eaf446b6fed4..0c0394a0d653fe9c2f615e2ff65fd5311d127f47 100644 (file)
@@ -1093,11 +1093,16 @@ 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, "diff.ignoresubmodules")) {
-               struct checkout_opts *opts = cb;
                handle_ignore_submodules_arg(&opts->diff_options, value);
                return 0;
        }
+       if (!strcmp(var, "checkout.guess")) {
+               opts->dwim_new_local_branch = git_config_bool(var, value);
+               return 0;
+       }
 
        if (starts_with(var, "submodule."))
                return git_default_submodule_config(var, value, NULL);