* [patch] color of branches in git status -sb
@ 2011-11-17 0:39 Nicolas Dudebout
2011-11-17 1:13 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Dudebout @ 2011-11-17 0:39 UTC (permalink / raw)
To: git
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
Modified Documentation/config.txt
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
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;
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [patch] color of branches in git status -sb
2011-11-17 0:39 [patch] color of branches in git status -sb Nicolas Dudebout
@ 2011-11-17 1:13 ` Junio C Hamano
2011-11-17 2:25 ` Nicolas Dudebout
0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2011-11-17 1:13 UTC (permalink / raw)
To: Nicolas Dudebout; +Cc: git
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;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] color of branches in git status -sb
2011-11-17 1:13 ` Junio C Hamano
@ 2011-11-17 2:25 ` Nicolas Dudebout
2011-11-17 10:55 ` Jonathan Nieder
0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Dudebout @ 2011-11-17 2:25 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
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:
> 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;
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] color of branches in git status -sb
2011-11-17 2:25 ` Nicolas Dudebout
@ 2011-11-17 10:55 ` Jonathan Nieder
2011-11-17 14:16 ` Nicolas Dudebout
0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Nieder @ 2011-11-17 10:55 UTC (permalink / raw)
To: Nicolas Dudebout; +Cc: Junio C Hamano, git
Hi,
Nicolas Dudebout wrote:
> 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.
What git client are you using? Maybe it can be fixed to produce
patches that others can easily apply.
The 'git diff' and 'git format-patch' commands produce applicable
patches when I try, though that doesn't mean much.
Hope that helps,
Jonathan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] color of branches in git status -sb
2011-11-17 10:55 ` Jonathan Nieder
@ 2011-11-17 14:16 ` Nicolas Dudebout
0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Dudebout @ 2011-11-17 14:16 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: Junio C Hamano, git
I just tried to redo this patch.
I stumbled upon some inconsistency between the coloring of 'git
status' and 'git status -sb'.
I'll read a little bit more to give a better report with the correct patch.
In a nutshell, the local branch is colored by:
- WT_STATUS_ONBRANCH for git status
- WT_STATUS_LOCAL_BRANCH for git status -sb
Nicolas
On Thu, Nov 17, 2011 at 5:55 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Hi,
>
> Nicolas Dudebout wrote:
>
>> 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.
>
> What git client are you using? Maybe it can be fixed to produce
> patches that others can easily apply.
>
> The 'git diff' and 'git format-patch' commands produce applicable
> patches when I try, though that doesn't mean much.
>
> Hope that helps,
> Jonathan
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-17 14:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-17 0:39 [patch] color of branches in git status -sb Nicolas Dudebout
2011-11-17 1:13 ` Junio C Hamano
2011-11-17 2:25 ` Nicolas Dudebout
2011-11-17 10:55 ` Jonathan Nieder
2011-11-17 14:16 ` Nicolas Dudebout
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox