Skip to content
  • Jeff King's avatar
    default color.status.branch to "same as header" · 148135fc
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    This gives it the same behavior as we had prior to 1d282327
    
    
    (status: show branchname with a configurable color).
    
    To do this we need the concept of a "NIL" color, which is
    provided by color.[ch]. The implementation is very simple;
    in particular, there are no precautions taken against code
    accidentally printing the NIL. This should be fine in
    practice because:
    
      1. You can't input a NIL color in the config, so it must
         come from the in-code defaults. Which means it is up
         the client code to handle the NILs it defines.
    
      2. If we do ever print a NIL, it will be obvious what the
         problem is, and the bug can be fixed.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    148135fc