]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jk/color-variable-fixes' into next
authorJunio C Hamano <gitster@pobox.com>
Tue, 23 Sep 2025 19:05:33 +0000 (12:05 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 23 Sep 2025 19:05:33 +0000 (12:05 -0700)
Some places in the code confused a variable that is *not* a boolean
to enable color but is an enum that records what the user requested
to do about color.  A couple of bugs of this sort have been fixed,
while the code has been cleaned up to prevent similar bugs in the
future.

* jk/color-variable-fixes:
  config: store want_color() result in a separate bool
  add-interactive: retain colorbool values longer
  color: return bool from want_color()
  color: use git_colorbool enum type to store colorbools
  pretty: use format_commit_context.auto_color as colorbool
  diff: stop passing ecbdata->use_color as boolean
  diff: pass o->use_color directly to fill_metainfo()
  diff: don't use diff_options.use_color as a strict bool
  diff: simplify color_moved check when flushing
  grep: don't treat grep_opt.color as a strict bool
  color: return enum from git_config_colorbool()
  color: use GIT_COLOR_* instead of numeric constants

1  2 
builtin/add.c
builtin/clean.c
builtin/commit.c
builtin/range-diff.c
combine-diff.c
diff.c
diff.h
log-tree.c
transport.c
wt-status.c

diff --cc builtin/add.c
Simple merge
diff --cc builtin/clean.c
Simple merge
Simple merge
index aafcc99b96240f6a25cb18b5ebe378f26132e414,0d51ddd6234a5d0945202b4767d39c93e01afe6d..1bc082a869d817198429ef8a1833c2e77769ccc8
@@@ -6,7 -6,7 +6,8 @@@
  #include "parse-options.h"
  #include "range-diff.h"
  #include "config.h"
 +#include "parse.h"
+ #include "color.h"
  
  
  static const char * const builtin_range_diff_usage[] = {
diff --cc combine-diff.c
Simple merge
diff --cc diff.c
Simple merge
diff --cc diff.h
Simple merge
diff --cc log-tree.c
Simple merge
diff --cc transport.c
Simple merge
diff --cc wt-status.c
Simple merge