Skip to content
Commits on Mar 8, 2010
  1. @MarkLodato @gitster

    grep: Colorize selected, context, and function lines

    MarkLodato committed with gitster Mar 7, 2010
    Colorize non-matching text of selected lines, context lines, and
    function name lines.  The default for all three is no color, but they
    can be configured using color.grep.<slot>.  The first two are similar
    to the corresponding options in GNU grep, except that GNU grep applies
    the color to the entire line, not just non-matching text.
    
    Signed-off-by: Mark Lodato <lodatom@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @MarkLodato @gitster

    grep: Colorize filename, line number, and separator

    MarkLodato committed with gitster Mar 7, 2010
    Colorize the filename, line number, and separator in git grep output, as
    GNU grep does.  The colors are customizable through color.grep.<slot>.
    The default is to only color the separator (in cyan), since this gives
    the biggest legibility increase without overwhelming the user with
    colors.  GNU grep also defaults cyan for the separator, but defaults to
    magenta for the filename and to green for the line number, as well.
    
    There is one difference from GNU grep: When a binary file matches
    without -a, GNU grep does not color the <file> in "Binary file <file>
    matches", but we do.
    
    Like GNU grep, if --null is given, the null separators are not colored.
    
    For config.txt, use a a sub-list to describe the slots, rather than
    a single paragraph with parentheses, since this is much more readable.
    
    Remove the cast to int for `rm_eo - rm_so` since it is not necessary.
    
    Signed-off-by: Mark Lodato <lodatom@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Something went wrong with that request. Please try again.