git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git -c var=val not taken into account by git config?

From
DVDaniel Villeneuve <daniel2villeneuve@videotron.ca>
Date
May 8, 2012, 12:56 UTC
Message-ID
<4FA91819.20301@videotron.ca>
In-Reply-To
<20120508091606.GB31286@sigill.intra.peff.net>
On 08/05/12 05:16 AM, Jeff King wrote:
Show 18 quoted lines
> On Mon, May 07, 2012 at 07:16:51PM -0400, Daniel Villeneuve wrote:
>
>> Testing color configuration via scripting, I tried the following command:
>>
>> git -c color.diff=always config --get-colorbool diff false
>>
>> on a repository with color.diff=auto.
>>
>> I'd expect "true" as output, but got "false".  "git diff" works as
>> expected though.  Is this an exception for "git config"?
> I think you meant "--get-colorbool color.diff"; the fact that you are
> getting a colorbool does not automatically place the name inside the
> color.* section.
>
> With that change, it seems to work as expected.
>
> -Peff
>

Indeed, and the example was mentioning "color.diff". My error. Giving just "diff", I was getting results from color.ui instead.

Regards, -- Daniel

Previous: Jeff King
Message 3 of 3 in “git -c var=val not taken into account by git config?”
  1. Daniel VilleneuveMay 7, 2012
  2. Jeff KingMay 8, 2012
  3. Daniel VilleneuveMay 8, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.