git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
APAndy Parkins <andyparkins@gmail.com>
Date
Dec 14, 2006, 15:25 UTC
Message-ID
<200612141525.23671.andyparkins@gmail.com>
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(-)
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
Next: Andreas Ericsson
Message 1 of 2 in “git-status always says what branch it's on”
  1. git-status always says what branch it's onAndy Parkins, Dec 14, 2006
  2. Andreas EricssonDec 14, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.