public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Michael J Gruber <git@drmicha•warpmail.net>
Cc: git@vger•kernel.org
Subject: Re: [RFC/RFD] wt-status: take advice.statusHints seriously
Date: Thu, 22 Apr 2010 00:48:42 -0700	[thread overview]
Message-ID: <7v39yo53mt.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <b3168027365b78d47f5b95fc02f7853749075a33.1271861247.git.git@drmicha.warpmail.net> (Michael J. Gruber's message of "Wed\, 21 Apr 2010 16\:47\:51 +0200")

Michael J Gruber <git@drmicha•warpmail.net> writes:

> 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.

  reply	other threads:[~2010-04-22  7:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-21 14:47 [RFC/RFD] wt-status: take advice.statusHints seriously Michael J Gruber
2010-04-22  7:48 ` Junio C Hamano [this message]
2010-04-22 20:30   ` [PATCH 1/2] t7508: test advice.statusHints Michael J Gruber
2010-04-22 20:30     ` [PATCH 2/2] wt-status: take advice.statusHints seriously Michael J Gruber
2010-04-23  4:15       ` Tay Ray Chuan
2010-04-23  8:09         ` Michael J Gruber
2010-04-23 18:31           ` Jakub Narebski
2010-04-26 19:10           ` Jeff King
2010-04-26 19:10       ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v39yo53mt.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox$(echo .)com \
    --cc=git@drmicha$(echo .)warpmail.net \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox