]> git.ipfire.org Git - thirdparty/git.git/commit - color.h
color: fix max-size comment
authorJeff King <peff@peff.net>
Thu, 23 Jun 2016 17:31:44 +0000 (13:31 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 23 Jun 2016 18:32:51 +0000 (11:32 -0700)
commit0111681ecfe4d04a354536e62af1cde7c49e1c40
tree8ae428d62ebd897073b21013b8e5674afe067999
parent765428699a5381f113d19974720bc91b5bfeaf1d
color: fix max-size comment

We use fixed-size buffers for colors, because we know our
parsing cannot grow beyond a particular bound. However, our
comment description has two issues:

  1. It has the description in two forms: a short one, and
     one with more explanation. Over time the latter has
     been updated, but the former has not. Let's just drop
     the short one (after making sure everything it says
     is in the long one).

  2. As of ff40d18 (parse_color: recognize "no$foo" to clear
     the $foo attribute, 2014-11-20), the per-attribute size
     bumped to "3" (because "nobold" is actually "21;"). But
     that's not quite enough, as somebody may use both
     "bold" and "nobold", requiring 5 characters.

     This wasn't a problem for the final count, because we
     over-estimated in other ways, but let's clarify how we
     got to the final number.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
color.h