{"thread":{"id":"24864","subject":"[PATCH] Colorize the branch's name in the status' output","startedAt":"2010-08-26T00:09:09Z","lastAt":"2010-08-26T00:09:09Z","messageCount":1,"participants":["prouleau72@gmail.com"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"149022","messageId":"1282781349-1899-1-git-send-email-prouleau72@gmail.com","threadId":"24864","inReplyTo":null,"subject":"[PATCH] Colorize the branch's name in the status' output","fromName":"","fromEmail":"prouleau72@gmail.com","sentAt":"2010-08-26T00:09:09Z","receivedAt":"2010-08-26T00:09:09Z","isPatch":true,"sender":{"key":"prouleau72@gmail.com","avatar":"https://gravatar.com/avatar/8779e3894834cde1e03b6e5ede343580eb982eca9b5b16b0c492179048818607?d=mp&s=160"},"body":"From: Patryck Rouleau <PRouleau72@gmail.com>\n\nWhen we are not on a branch, the message \"Not currently on any branch.\" is\nshow in red. This patch makes the branch's name more visible by showing it\nin green (the color of local branch).\n---\n wt-status.c |    7 ++++---\n 1 files changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/wt-status.c b/wt-status.c\nindex 54b6b03..5497ef3 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -629,7 +629,7 @@ static void wt_status_print_tracking(struct wt_status *s)\n \n void wt_status_print(struct wt_status *s)\n {\n-\tconst char *branch_color = color(WT_STATUS_HEADER, s);\n+\tconst char *status_color = color(WT_STATUS_HEADER, s);\n \n \tif (s->branch) {\n \t\tconst char *on_what = \"On branch \";\n@@ -638,11 +638,12 @@ void wt_status_print(struct wt_status *s)\n \t\t\tbranch_name += 11;\n \t\telse if (!strcmp(branch_name, \"HEAD\")) {\n \t\t\tbranch_name = \"\";\n-\t\t\tbranch_color = color(WT_STATUS_NOBRANCH, s);\n+\t\t\tstatus_color = color(WT_STATUS_NOBRANCH, s);\n \t\t\ton_what = \"Not currently on any branch.\";\n \t\t}\n \t\tcolor_fprintf(s->fp, color(WT_STATUS_HEADER, s), \"# \");\n-\t\tcolor_fprintf_ln(s->fp, branch_color, \"%s%s\", on_what, branch_name);\n+\t\tcolor_fprintf(s->fp, status_color, \"%s\", on_what);\n+\t\tcolor_fprintf_ln(s->fp, color(WT_STATUS_LOCAL_BRANCH, s), \"%s\", branch_name);\n \t\tif (!s->is_initial)\n \t\t\twt_status_print_tracking(s);\n \t}\n-- \n1.7.1\n"}]}