Skip to content
  • Junio C Hamano's avatar
    log --format: teach %C(auto,black) to respect color config · 30825178
    Junio C Hamano authored
    
    
    Traditionally, %C(color attr) always emitted the ANSI color
    sequence; it was up to the scripts that wanted to conditionally
    color their output to omit %C(...) specifier when they do not want
    colors.
    
    Optionally allow "auto," to be prefixed to the color, so that the
    output is colored iff we would color regular "log" output
    (e.g., taking into account color.* and --color command line
    options).
    
    Tests and pretty_context bits by Jeff King <peff@peff.net>.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    30825178