Skip to content
  • Jeff King's avatar
    Revert "color: check color.ui in git_default_config()" · 33c643bb
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    This reverts commit 136c8c8b.
    
    That commit was trying to address a bug caused by 4c7f1819
    (make color.ui default to 'auto', 2013-06-10), in which
    plumbing like diff-tree defaulted to "auto" color, but did
    not respect a "color.ui" directive to disable it.
    
    But it also meant that we started respecting "color.ui" set
    to "always". This was a known problem, but 4c7f1819 argued
    that nobody ought to be doing that. However, that turned out
    to be wrong, and we got a number of bug reports related to
    "add -p" regressing in v2.14.2.
    
    Let's revert 136c8c8b, fixing the regression to "add -p".
    This leaves the problem from 4c7f1819
    
     unfixed, but:
    
      1. It's a pretty obscure problem in the first place. I
         only noticed it while working on the color code, and we
         haven't got a single bug report or complaint about it.
    
      2. We can make a more moderate fix on top by respecting
         "never" but not "always" for plumbing commands. This
         is just the minimal fix to go back to the working state
         we had before v2.14.2.
    
    Note that this isn't a pure revert. We now have a test in
    t3701 which shows off the "add -p" regression. This can be
    flipped to success.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    33c643bb