* [PATCH] Colorize the branch's name in the status' output
@ 2010-08-26 0:09 prouleau72
0 siblings, 0 replies; only message in thread
From: prouleau72 @ 2010-08-26 0:09 UTC (permalink / raw)
To: git; +Cc: Patryck Rouleau
From: Patryck Rouleau <PRouleau72@gmail.com>
When we are not on a branch, the message "Not currently on any branch." is
show in red. This patch makes the branch's name more visible by showing it
in green (the color of local branch).
---
wt-status.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/wt-status.c b/wt-status.c
index 54b6b03..5497ef3 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -629,7 +629,7 @@ static void wt_status_print_tracking(struct wt_status *s)
void wt_status_print(struct wt_status *s)
{
- const char *branch_color = color(WT_STATUS_HEADER, s);
+ const char *status_color = color(WT_STATUS_HEADER, s);
if (s->branch) {
const char *on_what = "On branch ";
@@ -638,11 +638,12 @@ void wt_status_print(struct wt_status *s)
branch_name += 11;
else if (!strcmp(branch_name, "HEAD")) {
branch_name = "";
- branch_color = color(WT_STATUS_NOBRANCH, s);
+ status_color = color(WT_STATUS_NOBRANCH, s);
on_what = "Not currently on any branch.";
}
color_fprintf(s->fp, color(WT_STATUS_HEADER, s), "# ");
- color_fprintf_ln(s->fp, branch_color, "%s%s", on_what, branch_name);
+ color_fprintf(s->fp, status_color, "%s", on_what);
+ color_fprintf_ln(s->fp, color(WT_STATUS_LOCAL_BRANCH, s), "%s", branch_name);
if (!s->is_initial)
wt_status_print_tracking(s);
}
--
1.7.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-08-26 0:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-26 0:09 [PATCH] Colorize the branch's name in the status' output prouleau72
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).