aboutsummaryrefslogtreecommitdiff
path: root/builtin-log.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-02-20 16:13:56 -0800
committerJunio C Hamano <gitster@pobox.com>2008-02-20 16:13:56 -0800
commitb23b27eb5dc950081d4f76ae84f10168c4d149bd (patch)
tree6e29309bd8f2ae4b200214a0d2257aa1bc909515 /builtin-log.c
parent6fe870f032e4a247cdcf2949bb24d103873ff597 (diff)
parent6b2f2d9805dd22c6f74957e0d76a1d2921b40c16 (diff)
downloadgit-b23b27eb5dc950081d4f76ae84f10168c4d149bd.tar.gz
git-b23b27eb5dc950081d4f76ae84f10168c4d149bd.tar.xz
Merge branch 'mk/color'
* mk/color: Add color.ui variable which globally enables colorization if set
Diffstat (limited to 'builtin-log.c')
-rw-r--r--builtin-log.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/builtin-log.c b/builtin-log.c
index 5fea64aba..c67d63cb1 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -5,6 +5,7 @@
* 2006 Junio Hamano
*/
#include "cache.h"
+#include "color.h"
#include "commit.h"
#include "diff.h"
#include "revision.h"
@@ -236,6 +237,10 @@ int cmd_whatchanged(int argc, const char **argv, const char *prefix)
struct rev_info rev;
git_config(git_log_config);
+
+ if (diff_use_color_default == -1)
+ diff_use_color_default = git_use_color_default;
+
init_revisions(&rev, prefix);
rev.diff = 1;
rev.simplify_history = 0;
@@ -308,6 +313,10 @@ int cmd_show(int argc, const char **argv, const char *prefix)
int i, count, ret = 0;
git_config(git_log_config);
+
+ if (diff_use_color_default == -1)
+ diff_use_color_default = git_use_color_default;
+
init_revisions(&rev, prefix);
rev.diff = 1;
rev.combine_merges = 1;
@@ -368,6 +377,10 @@ int cmd_log_reflog(int argc, const char **argv, const char *prefix)
struct rev_info rev;
git_config(git_log_config);
+
+ if (diff_use_color_default == -1)
+ diff_use_color_default = git_use_color_default;
+
init_revisions(&rev, prefix);
init_reflog_walk(&rev.reflog_info);
rev.abbrev_commit = 1;
@@ -396,6 +409,10 @@ int cmd_log(int argc, const char **argv, const char *prefix)
struct rev_info rev;
git_config(git_log_config);
+
+ if (diff_use_color_default == -1)
+ diff_use_color_default = git_use_color_default;
+
init_revisions(&rev, prefix);
rev.always_show_header = 1;
cmd_log_init(argc, argv, prefix, &rev);