threads / patch / 43669

patchgit-status always says what branch it's on

Subject: [PATCH] git-status always says what branch it's on

## tl;dr

2 messages between Dec 14, 2006 and Dec 14, 2006. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Andy Parkins· Dec 14, 2006, 15:25 UTC · lore
If the current branch was "master" then git-status wouldn't say
 # On branch XXXX

In its output. This patch makes it so that this message is always output; regardless of branch name.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
---
 wt-status.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to wt-status.c +1 −1
diff --git a/wt-status.c b/wt-status.c
index de1be5b..9a78dac 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -271,7 +271,7 @@ static void wt_status_print_verbose(struct wt_status *s)
 
 void wt_status_print(struct wt_status *s)
 {
-	if (s->branch && strcmp(s->branch, "refs/heads/master"))
+	if (s->branch)
 		color_printf_ln(color(WT_STATUS_HEADER),
 			"# On branch %s", s->branch);
 
-- 
1.4.4.1.g3ece-dirty
Andreas Ericsson· Dec 14, 2006, 15:54 UTC · re: Andy Parkins · lore

Re: [PATCH] git-status always says what branch it's on

Andy Parkins wrote:
Show 7 quoted lines
> If the current branch was "master" then git-status wouldn't say
> 
>  # On branch XXXX
> 
> In its output.  This patch makes it so that this message is always
> output; regardless of branch name.
> 

I like it. I know that it's quiet when I'm on 'master', but I still need to spend an extra cycle to remember that fact. Uniformity is a good thing in program behaviour.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se

← back to recent threads