From: Junio C Hamano Date: Sat, 15 Aug 2009 09:14:14 +0000 (-0700) Subject: git commit --dry-run -v: show diff in color when asked X-Git-Tag: v1.6.5-rc0~26^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3fa509dfbdb8526453f4213f79b371bdfa493f0e;p=git.git git commit --dry-run -v: show diff in color when asked The earlier implementation of --dry-run didn't duplicate the use of color "git status -v" set up for diff output. Signed-off-by: Junio C Hamano --- diff --git a/builtin-commit.c b/builtin-commit.c index 1c200eb96..200ffdaad 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -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