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

Re: [patch] color of branches in git status -sb

From
Nicolas Dudebout <nicolas.dudebout@gmail.com>
Date
Nov 17, 2011, 02:25 UTC
Message-ID
<CA+TMmKkM0B8Bge4Jz7KVjR=F-dK0ojuVJp-fe2vj96uq5z0DrA@mail.gmail.com>
In-Reply-To
<7v4ny3pn4v.fsf@alter.siamese.dyndns.org>

Please disregard this as a patch. I do not have the time to understand how they have to be properly formatted. I just pasted the output of my git client. I am just letting you know that there is a problem that can be easily fixed. I can resend a separate email if that makes it easier for your bug tracking.

On Wed, Nov 16, 2011 at 8:13 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 49 quoted lines
> Nicolas Dudebout <nicolas.dudebout@gmail.com> writes:
>
>> The following patch fixes the fact that two colors of the status
>> output could not be configured in .git/config.
>>
>> The color of the current branch could not be modified because of the
>> name WT_STATUS_ONBRANCH having been changed to WT_STATUS_LOCAL_BRANCH.
>>
>> The color of the remote branch was not defined at all.
>>
>> By the way, when I do 'git status' instead of git 'status -sb' the
>> local and remote branch do not get colored. Is this a desired
>> behavior?
>>
>> Nicolas
>
> Please follow Documentation/SubmittingPatches.
>
> Also expect that patches to add new feature this deep in the pre-release
> feature freeze period is not likely to get reviewed by regular list
> members.
>
>>
>>       Modified   Documentation/config.txt
>
> Don't do this. We can tell what is modified from "diff --git" lines.
>
>> diff --git a/Documentation/config.txt b/Documentation/config.txt
>> index 5a841da..7a0ddd6 100644
>> --- a/Documentation/config.txt
>> +++ b/Documentation/config.txt
>> @@ -809 +809,2 @@ color.status.<slot>::
>> -     `branch` (the current branch), or
>> +     `branch` (the current branch),
>> +        `remote` (the remote branch) or
>
> Don't do this. Proper patches have context lines for good reasons.
>
>>       Modified   builtin/commit.c
>> diff --git a/builtin/commit.c b/builtin/commit.c
>> index c46f2d1..4674600 100644
>> --- a/builtin/commit.c
>> +++ b/builtin/commit.c
>> @@ -1118 +1118,3 @@ static int parse_status_slot(const char *var, int offset)
>> -             return WT_STATUS_ONBRANCH;
>> +             return WT_STATUS_LOCAL_BRANCH;
>> +     if (!strcasecmp(var+offset, "remote"))
>> +             return WT_STATUS_REMOTE_BRANCH;
>
Previous: Junio C HamanoNext: Jonathan Nieder
Message 3 of 5 in “color of branches in git status -sb”
  1. color of branches in git status -sbNicolas Dudebout, Nov 17, 2011
  2. Junio C HamanoNov 17, 2011
  3. Nicolas DudeboutNov 17, 2011
  4. Jonathan NiederNov 17, 2011
  5. Nicolas DudeboutNov 17, 2011

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.