mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
Merge branch 'sb/blame-color'
Code clean-up. * sb/blame-color: blame: prefer xsnprintf to strcpy for colors
This commit is contained in:
commit
b8d93072bb
|
@ -1071,7 +1071,9 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
|
|||
find_alignment(&sb, &output_option);
|
||||
if (!*repeated_meta_color &&
|
||||
(output_option & OUTPUT_COLOR_LINE))
|
||||
strcpy(repeated_meta_color, GIT_COLOR_CYAN);
|
||||
xsnprintf(repeated_meta_color,
|
||||
sizeof(repeated_meta_color),
|
||||
"%s", GIT_COLOR_CYAN);
|
||||
}
|
||||
if (output_option & OUTPUT_ANNOTATE_COMPAT)
|
||||
output_option &= ~(OUTPUT_COLOR_LINE | OUTPUT_SHOW_AGE_WITH_COLOR);
|
||||
|
|
Loading…
Reference in a new issue