Expand ~ and ~user in core.excludesfile, commit.template
[gitweb.git] / builtin-commit.c
index 1c200eb9631c983dbde1a150497b0308eb1809d4..2299dc75ceebc6792fd51118aaff721cc865f844 100644 (file)
@@ -954,7 +954,7 @@ static int git_commit_config(const char *k, const char *v, void *cb)
        struct wt_status *s = cb;
 
        if (!strcmp(k, "commit.template"))
-               return git_config_string(&template_file, k, v);
+               return git_config_pathname(&template_file, k, v);
 
        return git_status_config(k, v, s);
 }
@@ -979,9 +979,11 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
 
        argc = parse_and_validate_options(argc, argv, builtin_commit_usage,
                                          prefix, &s);
-       if (dry_run)
+       if (dry_run) {
+               if (diff_use_color_default == -1)
+                       diff_use_color_default = git_use_color_default;
                return dry_run_commit(argc, argv, prefix, &s);
-
+       }
        index_file = prepare_index(argc, argv, prefix, 0);
 
        /* Set up everything for writing the commit object.  This includes