From: Jeff King Date: Thu, 22 Nov 2007 12:18:36 GMT Subject: Re: [PATCH 4/5] Let git-add--interactive read colors from configuration Message-ID: <20071122121836.GG12913@sigill.intra.peff.net> In-Reply-To: <20071122045606.0232fc2d@paradox.zwell.net> On Thu, Nov 22, 2007 at 04:56:06AM -0600, Dan Zwell wrote: > + # Grab the 3 main colors in git color string format, with sane > + # (visible) defaults: > + $prompt_color = Git::color_to_ansi_code( > + scalar $repo->config_default('color.interactive.prompt', > + 'bold blue')); And by the same token as the last message, given that config_* take only two arguments, is there a reason not to extend them so that $repo->config_bool('my.key', 0); handles the default. Then I think you could simplify this to just: $repo->config_color('color.interactive.prompt', 'bold blue'); and hide the color_to_ansi_code messiness from the script altogether. -Peff