@matheusbsbs / matheus-bagliano / commits / 97beb812db
Fork 0

builtin-log: respect diff configuration options

The log commands are all capable of generating diffs, so we should respect those configuration options for diffs here. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>

Eric Wong committed Jul 7, 2006 at 03:10 UTC 97beb812dbbba750e6c9326a7f25655ebcf7bb44
1 file changed +5 -2
builtin-log.c
+5 -2
@@ -47,6 +47,7 @@ int cmd_whatchanged(int argc, const char **argv, char **envp)
47 {
48 struct rev_info rev;
49
50 + git_config(git_diff_config);
51 init_revisions(&rev);
52 rev.diff = 1;
53 rev.diffopt.recursive = 1;
@@ -61,6 +62,7 @@ int cmd_show(int argc, const char **argv, char **envp)
62 {
63 struct rev_info rev;
64
65 + git_config(git_diff_config);
66 init_revisions(&rev);
67 rev.diff = 1;
68 rev.diffopt.recursive = 1;
@@ -77,6 +79,7 @@ int cmd_log(int argc, const char **argv, char **envp)
79 {
80 struct rev_info rev;
81
82 + git_config(git_diff_config);
83 init_revisions(&rev);
84 rev.always_show_header = 1;
85 cmd_log_init(argc, argv, envp, &rev);
@@ -102,7 +105,7 @@ static int git_format_config(const char *var, const char *value)
105 strcat(extra_headers, value);
106 return 0;
107 }
105 - return git_default_config(var, value);
108 + return git_diff_config(var, value);
109 }
110
111
@@ -234,6 +237,7 @@ int cmd_format_patch(int argc, const char **argv, char **envp)
237 struct diff_options patch_id_opts;
238 char *add_signoff = NULL;
239
240 + git_config(git_format_config);
241 init_revisions(&rev);
242 rev.commit_format = CMIT_FMT_EMAIL;
243 rev.verbose_header = 1;
@@ -243,7 +247,6 @@ int cmd_format_patch(int argc, const char **argv, char **envp)
247 rev.diffopt.msg_sep = "";
248 rev.diffopt.recursive = 1;
249
246 - git_config(git_format_config);
250 rev.extra_headers = extra_headers;
251
252 /*