{"thread":{"id":"28953","subject":"[patch] color of branches in git status -sb","startedAt":"2011-11-17T00:39:46Z","lastAt":"2011-11-17T14:16:41Z","messageCount":5,"participants":["Nicolas Dudebout","Junio C Hamano","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"179604","messageId":"CA+TMmKns-9jiedxY4FiJoBg8akkxwkPBib11EmvCD3r7mRA6vQ@mail.gmail.com","threadId":"28953","inReplyTo":null,"subject":"[patch] color of branches in git status -sb","fromName":"Nicolas Dudebout","fromEmail":"nicolas.dudebout@gmail.com","sentAt":"2011-11-17T00:39:46Z","receivedAt":"2011-11-17T00:39:46Z","isPatch":true,"sender":{"key":"nicolas.dudebout@gmail.com","avatar":"https://gravatar.com/avatar/40b08a1cb5f41df9ef4a35e658a60d8a81697cdc07c88d352428c92f20c2d452?d=mp&s=160"},"body":"The following patch fixes the fact that two colors of the status\noutput could not be configured in .git/config.\n\nThe color of the current branch could not be modified because of the\nname WT_STATUS_ONBRANCH having been changed to WT_STATUS_LOCAL_BRANCH.\n\nThe color of the remote branch was not defined at all.\n\nBy the way, when I do 'git status' instead of git 'status -sb' the\nlocal and remote branch do not get colored. Is this a desired\nbehavior?\n\nNicolas\n\n\tModified   Documentation/config.txt\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 5a841da..7a0ddd6 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -809 +809,2 @@ color.status.<slot>::\n-\t`branch` (the current branch), or\n+\t`branch` (the current branch),\n+        `remote` (the remote branch) or\n\tModified   builtin/commit.c\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex c46f2d1..4674600 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -1118 +1118,3 @@ static int parse_status_slot(const char *var, int offset)\n-\t\treturn WT_STATUS_ONBRANCH;\n+\t\treturn WT_STATUS_LOCAL_BRANCH;\n+\tif (!strcasecmp(var+offset, \"remote\"))\n+\t\treturn WT_STATUS_REMOTE_BRANCH;\n"},{"id":"179607","messageId":"7v4ny3pn4v.fsf@alter.siamese.dyndns.org","threadId":"28953","inReplyTo":"CA+TMmKns-9jiedxY4FiJoBg8akkxwkPBib11EmvCD3r7mRA6vQ@mail.gmail.com","subject":"Re: [patch] color of branches in git status -sb","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-17T01:13:04Z","receivedAt":"2011-11-17T01:13:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nicolas Dudebout <nicolas.dudebout@gmail.com> writes:\n\n> The following patch fixes the fact that two colors of the status\n> output could not be configured in .git/config.\n>\n> The color of the current branch could not be modified because of the\n> name WT_STATUS_ONBRANCH having been changed to WT_STATUS_LOCAL_BRANCH.\n>\n> The color of the remote branch was not defined at all.\n>\n> By the way, when I do 'git status' instead of git 'status -sb' the\n> local and remote branch do not get colored. Is this a desired\n> behavior?\n>\n> Nicolas\n\nPlease follow Documentation/SubmittingPatches.\n\nAlso expect that patches to add new feature this deep in the pre-release\nfeature freeze period is not likely to get reviewed by regular list\nmembers.\n\n>\n> \tModified   Documentation/config.txt\n\nDon't do this. We can tell what is modified from \"diff --git\" lines.\n\n> diff --git a/Documentation/config.txt b/Documentation/config.txt\n> index 5a841da..7a0ddd6 100644\n> --- a/Documentation/config.txt\n> +++ b/Documentation/config.txt\n> @@ -809 +809,2 @@ color.status.<slot>::\n> -\t`branch` (the current branch), or\n> +\t`branch` (the current branch),\n> +        `remote` (the remote branch) or\n\nDon't do this. Proper patches have context lines for good reasons.\n\n> \tModified   builtin/commit.c\n> diff --git a/builtin/commit.c b/builtin/commit.c\n> index c46f2d1..4674600 100644\n> --- a/builtin/commit.c\n> +++ b/builtin/commit.c\n> @@ -1118 +1118,3 @@ static int parse_status_slot(const char *var, int offset)\n> -\t\treturn WT_STATUS_ONBRANCH;\n> +\t\treturn WT_STATUS_LOCAL_BRANCH;\n> +\tif (!strcasecmp(var+offset, \"remote\"))\n> +\t\treturn WT_STATUS_REMOTE_BRANCH;\n"},{"id":"179610","messageId":"CA+TMmKkM0B8Bge4Jz7KVjR=F-dK0ojuVJp-fe2vj96uq5z0DrA@mail.gmail.com","threadId":"28953","inReplyTo":"7v4ny3pn4v.fsf@alter.siamese.dyndns.org","subject":"Re: [patch] color of branches in git status -sb","fromName":"Nicolas Dudebout","fromEmail":"nicolas.dudebout@gmail.com","sentAt":"2011-11-17T02:25:51Z","receivedAt":"2011-11-17T02:25:51Z","isPatch":true,"sender":{"key":"nicolas.dudebout@gmail.com","avatar":"https://gravatar.com/avatar/40b08a1cb5f41df9ef4a35e658a60d8a81697cdc07c88d352428c92f20c2d452?d=mp&s=160"},"body":"Please disregard this as a patch. I do not have the time to understand\nhow they have to be properly formatted. I just pasted the output of my\ngit client.\nI am just letting you know that there is a problem that can be easily\nfixed. I can resend a separate email if that makes it easier for your\nbug tracking.\n\nOn Wed, Nov 16, 2011 at 8:13 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Nicolas Dudebout <nicolas.dudebout@gmail.com> writes:\n>\n>> The following patch fixes the fact that two colors of the status\n>> output could not be configured in .git/config.\n>>\n>> The color of the current branch could not be modified because of the\n>> name WT_STATUS_ONBRANCH having been changed to WT_STATUS_LOCAL_BRANCH.\n>>\n>> The color of the remote branch was not defined at all.\n>>\n>> By the way, when I do 'git status' instead of git 'status -sb' the\n>> local and remote branch do not get colored. Is this a desired\n>> behavior?\n>>\n>> Nicolas\n>\n> Please follow Documentation/SubmittingPatches.\n>\n> Also expect that patches to add new feature this deep in the pre-release\n> feature freeze period is not likely to get reviewed by regular list\n> members.\n>\n>>\n>>       Modified   Documentation/config.txt\n>\n> Don't do this. We can tell what is modified from \"diff --git\" lines.\n>\n>> diff --git a/Documentation/config.txt b/Documentation/config.txt\n>> index 5a841da..7a0ddd6 100644\n>> --- a/Documentation/config.txt\n>> +++ b/Documentation/config.txt\n>> @@ -809 +809,2 @@ color.status.<slot>::\n>> -     `branch` (the current branch), or\n>> +     `branch` (the current branch),\n>> +        `remote` (the remote branch) or\n>\n> Don't do this. Proper patches have context lines for good reasons.\n>\n>>       Modified   builtin/commit.c\n>> diff --git a/builtin/commit.c b/builtin/commit.c\n>> index c46f2d1..4674600 100644\n>> --- a/builtin/commit.c\n>> +++ b/builtin/commit.c\n>> @@ -1118 +1118,3 @@ static int parse_status_slot(const char *var, int offset)\n>> -             return WT_STATUS_ONBRANCH;\n>> +             return WT_STATUS_LOCAL_BRANCH;\n>> +     if (!strcasecmp(var+offset, \"remote\"))\n>> +             return WT_STATUS_REMOTE_BRANCH;\n>\n"},{"id":"179635","messageId":"20111117105320.GA5591@elie.hsd1.il.comcast.net","threadId":"28953","inReplyTo":"CA+TMmKkM0B8Bge4Jz7KVjR=F-dK0ojuVJp-fe2vj96uq5z0DrA@mail.gmail.com","subject":"Re: [patch] color of branches in git status -sb","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2011-11-17T10:55:30Z","receivedAt":"2011-11-17T10:55:30Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nNicolas Dudebout wrote:\n\n> Please disregard this as a patch. I do not have the time to understand\n> how they have to be properly formatted. I just pasted the output of my\n> git client.\n\nWhat git client are you using?  Maybe it can be fixed to produce\npatches that others can easily apply.\n\nThe 'git diff' and 'git format-patch' commands produce applicable\npatches when I try, though that doesn't mean much.\n\nHope that helps,\nJonathan\n"},{"id":"179638","messageId":"CA+TMmK=-KZOo9jY=8T2eO--cSvrT=g1H20LOmNQiSv3SULqQcw@mail.gmail.com","threadId":"28953","inReplyTo":"20111117105320.GA5591@elie.hsd1.il.comcast.net","subject":"Re: [patch] color of branches in git status -sb","fromName":"Nicolas Dudebout","fromEmail":"nicolas.dudebout@gmail.com","sentAt":"2011-11-17T14:16:41Z","receivedAt":"2011-11-17T14:16:41Z","isPatch":true,"sender":{"key":"nicolas.dudebout@gmail.com","avatar":"https://gravatar.com/avatar/40b08a1cb5f41df9ef4a35e658a60d8a81697cdc07c88d352428c92f20c2d452?d=mp&s=160"},"body":"I just tried to redo this patch.\nI stumbled upon some inconsistency between the coloring of 'git\nstatus' and 'git status -sb'.\nI'll read a little bit more to give a better report with the correct patch.\n\nIn a nutshell, the local branch is colored by:\n- WT_STATUS_ONBRANCH for git status\n- WT_STATUS_LOCAL_BRANCH for git status -sb\n\nNicolas\n\nOn Thu, Nov 17, 2011 at 5:55 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Hi,\n>\n> Nicolas Dudebout wrote:\n>\n>> Please disregard this as a patch. I do not have the time to understand\n>> how they have to be properly formatted. I just pasted the output of my\n>> git client.\n>\n> What git client are you using?  Maybe it can be fixed to produce\n> patches that others can easily apply.\n>\n> The 'git diff' and 'git format-patch' commands produce applicable\n> patches when I try, though that doesn't mean much.\n>\n> Hope that helps,\n> Jonathan\n>\n"}]}