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

[PATCH] checkout: obey -q option

From
Gustaf Hendeby <hendeby@isy.liu.se>
Date
Feb 20, 2008, 23:08 UTC
Message-ID
<1203548939-17350-1-git-send-email-hendeby@isy.liu.se>
Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
---

This makes the new tracking output introduced by 79a1e6b432d7d7ffaf2079d4cf895583502ca923 (checkout: notice when the switched branch is behind or forked) obey the silence option. FWIW, I would really prefer only to get the one line informing me that I could do a fast-forward or will need a merge unless I specifically ask for more. Is that something worth exploring? Right now checkout is a bit too talkative for my taste.

/Gustaf
 builtin-checkout.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin-checkout.c b/builtin-checkout.c
index b1820a4..104ce4f 100644
--- a/builtin-checkout.c
+++ b/builtin-checkout.c
@@ -402,7 +402,7 @@ static void update_refs_for_switch(struct checkout_opts *opts,
 	}
 	remove_branch_state();
 	strbuf_release(&msg);
-	if (new->path || !strcmp(new->name, "HEAD"))
+	if (!opts->quiet && (new->path || !strcmp(new->name, "HEAD")))
 		adjust_to_tracking(new, opts);
 }
 
-- 
1.5.4.2.232.g08e5
Message 1 of 1 in “checkout: obey -q option”
  1. checkout: obey -q optionGustaf Hendeby, Feb 20, 2008

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.