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

Re: [RFC/RFD] wt-status: take advice.statusHints seriously

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 22, 2010, 07:48 UTC
Message-ID
<7v39yo53mt.fsf@alter.siamese.dyndns.org>
In-Reply-To
<b3168027365b78d47f5b95fc02f7853749075a33.1271861247.git.git@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
Show 18 quoted lines
> Currently, status gives a lot of hints even when advice.statusHints is
> false. Change this so that all hints depend on the config varaible.
>
> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
> ---
>  wt-status.c |   12 ++++++------
>  1 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/wt-status.c b/wt-status.c
> index 8ca59a2..38076ee 100644
> --- a/wt-status.c
> +++ b/wt-status.c
> @@ -625,7 +625,7 @@ void wt_status_print(struct wt_status *s)
>  	if (s->show_untracked_files)
>  		wt_status_print_untracked(s);
>  	else if (s->commitable)
> -		 fprintf(s->fp, "# Untracked files not listed (use -u option to show untracked files)\n");
> +		 fprintf(s->fp, "# Untracked files not listed%s\n", advice_status_hints ? " (use -u option to show untracked files)" : "");

This is a good change, but because you are losing the grep-ability with this patch (i.e. "grep -e 'not listed (use -u'" no longer works), I'd prefer to see this long line split into:

		 fprintf(s->fp, "# Untracked files not listed%s\n",
			advice_status_hints
			? " (use -u option to show untracked files)" : "");
Likewise for all the other changes.                        
Thanks.
Previous: Michael J GruberNext: Michael J Gruber
Message 2 of 9 in “[RFC/RFD] wt-status: take advice.statusHints seriously”
  1. Michael J GruberApr 21, 2010
  2. Junio C HamanoApr 22, 2010
  3. 1/2 t7508: test advice.statusHintsMichael J Gruber, Apr 22, 2010
  4. 2/2 wt-status: take advice.statusHints seriouslyMichael J Gruber, Apr 22, 2010
  5. Tay Ray ChuanApr 23, 2010
  6. Michael J GruberApr 23, 2010
  7. Jakub NarebskiApr 23, 2010
  8. Jeff KingApr 26, 2010
  9. Jeff KingApr 26, 2010

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.