git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] move the color variables to color.c

From
Markus Heidelberg <markus.heidelberg@web.de>
Date
Jan 18, 2009, 20:39 UTC
Message-ID
<200901182139.13995.markus.heidelberg@web.de>
In-Reply-To
<200901182137.16562.markus.heidelberg@web.de>

To be consistent with where the branch color variable is located now, move the variables for diff and status color to the same place.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
---
 color.c     |    4 ++--
 color.h     |    2 ++
 diff.c      |    1 -
 diff.h      |    1 -
 wt-status.c |    1 -
 wt-status.h |    1 -
 6 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/color.c b/color.c
index 7a8bf6e..b23c39c 100644
--- a/color.c
+++ b/color.c
@@ -1,12 +1,12 @@
 #include "cache.h"
 #include "color.h"
-#include "diff.h"
-#include "wt-status.h"
 
 #define COLOR_RESET "\033[m"
 
 int git_use_color_default = 0;
 int branch_use_color = -1;
+int diff_use_color_default = -1;
+int wt_status_use_color = -1;
 
 static int parse_color(const char *name, int len)
 {
diff --git a/color.h b/color.h
index 6924848..3b47d99 100644
--- a/color.h
+++ b/color.h
@@ -10,6 +10,8 @@
 extern int git_use_color_default;
 
 extern int branch_use_color;
+extern int diff_use_color_default;
+extern int wt_status_use_color;
 
 /*
  * Use this instead of git_default_config if you need the value of color.ui.
diff --git a/diff.c b/diff.c
index d235482..4bd068c 100644
--- a/diff.c
+++ b/diff.c
@@ -22,7 +22,6 @@
 static int diff_detect_rename_default;
 static int diff_rename_limit_default = 200;
 static int diff_suppress_blank_empty;
-int diff_use_color_default = -1;
 static const char *external_diff_cmd_cfg;
 int diff_auto_refresh_index = 1;
 static int diff_mnemonic_prefix;
diff --git a/diff.h b/diff.h
index 4d5a327..f2c9984 100644
--- a/diff.h
+++ b/diff.h
@@ -188,7 +188,6 @@ extern void diff_unmerge(struct diff_options *,
 
 extern int git_diff_basic_config(const char *var, const char *value, void *cb);
 extern int git_diff_ui_config(const char *var, const char *value, void *cb);
-extern int diff_use_color_default;
 extern void diff_setup(struct diff_options *);
 extern int diff_opt_parse(struct diff_options *, const char **, int);
 extern int diff_setup_done(struct diff_options *);
diff --git a/wt-status.c b/wt-status.c
index 96ff2f8..5c3742b 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -12,7 +12,6 @@
 #include "remote.h"
 
 int wt_status_relative_paths = 1;
-int wt_status_use_color = -1;
 int wt_status_submodule_summary;
 static char wt_status_colors[][COLOR_MAXLEN] = {
 	"",         /* WT_STATUS_HEADER: normal */
diff --git a/wt-status.h b/wt-status.h
index 78add09..6258fd0 100644
--- a/wt-status.h
+++ b/wt-status.h
@@ -36,7 +36,6 @@ struct wt_status {
 };
 
 int git_status_config(const char *var, const char *value, void *cb);
-extern int wt_status_use_color;
 extern int wt_status_relative_paths;
 void wt_status_prepare(struct wt_status *s);
 void wt_status_print(struct wt_status *s);
-- 
1.6.1.208.g3a5f4
Previous: Markus HeidelbergNext: Jeff King
Message 17 of 40 in “Re: [PATCH 3/3] Adds a #!bash to the top of bash completions so that editors can recognize, it as a bash script. Also adds a few simple comments above commands that, take arguments. The comments are meant to remind editors of potential, problems that”
  1. BazJan 16, 2009
  2. Jeff KingJan 17, 2009
  3. Markus HeidelbergJan 17, 2009
  4. Jeff KingJan 17, 2009
  5. 1/2 color: make it easier for non-config to parse color specsJeff King, Jan 17, 2009
  6. René ScharfeJan 18, 2009
  7. Jeff KingJan 18, 2009
  8. Jeff KingJan 18, 2009
  9. René ScharfeJan 18, 2009
  10. Jeff KingJan 18, 2009
  11. 2/2 expand --pretty=format color optionsJeff King, Jan 17, 2009
  12. René ScharfeJan 18, 2009
  13. Jeff KingJan 18, 2009
  14. Jeff KingJan 18, 2009
  15. Jeff KingJan 18, 2009
  16. 1/2 handle color.ui at a central placeMarkus Heidelberg, Jan 18, 2009
  17. 2/2 move the color variables to color.cMarkus Heidelberg, Jan 18, 2009
  18. Jeff KingJan 20, 2009
  19. Markus HeidelbergJan 21, 2009
  20. Jeff KingJan 22, 2009
  21. Markus HeidelbergJan 22, 2009
  22. Junio C HamanoJan 23, 2009
  23. Markus HeidelbergJan 24, 2009
  24. Johannes SchindelinJan 24, 2009
  25. Markus HeidelbergJan 24, 2009
  26. Junio C HamanoJan 24, 2009
  27. Jeff KingJan 24, 2009
  28. Junio C HamanoJan 24, 2009
  29. Jeff KingJan 24, 2009
  30. Markus HeidelbergJan 25, 2009
  31. Junio C HamanoJan 19, 2009
  32. Jeff KingJan 20, 2009
  33. Johannes SchindelinJan 20, 2009
  34. Johannes SchindelinJan 20, 2009
  35. Jeff KingJan 20, 2009
  36. Johannes SchindelinJan 20, 2009
  37. Jeff KingJan 20, 2009
  38. Cyellow, was Re: [a way-too-long line]Johannes Schindelin, Jan 17, 2009
  39. Jeff KingJan 17, 2009
  40. Johannes SchindelinJan 17, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.