git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: Tay Ray Chuan <rctay89@gmail.com>,
	git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Jeff King <peff@peff.net>
Subject: Re: [PATCH 2/2] wt-status: take advice.statusHints seriously
Date: Fri, 23 Apr 2010 11:31:55 -0700 (PDT)	[thread overview]
Message-ID: <m3aasudnzy.fsf@localhost.localdomain> (raw)
In-Reply-To: <4BD155D0.5080402@drmicha.warpmail.net>

Michael J Gruber <git@drmicha.warpmail.net> writes:
> Tay Ray Chuan venit, vidit, dixit 23.04.2010 06:15:
>> 
>> On Fri, Apr 23, 2010 at 4:30 AM, Michael J Gruber
>> <git@drmicha.warpmail.net> wrote:
>>>                else if (s->untracked.nr)
>>> -                       printf("nothing added to commit but untracked files present (use \"git add\" to track)\n");
>>> +                       printf("nothing added to commit but untracked files present%s\n",
>>> +                               advice_status_hints
>>> +                               ? " (use \"git add\" to track)" : "");
>> 
>> while we're at it, perhaps we could put the hints on its own line,
> 
> I don't think I'm the only one to turn sour at every encounter with the
> phrase "while we're at it". I did fix one extraneous space in code
> "while I was at it", yes, but:

I agre that it might be a good idea, but it is not something to do
"while we're at it".
 
Tay Ray Chuan probably meant that he "while at it" (while reviewing
this patch) had this idea...

>> with a "hint: " prefix:
>> 
>>   nothing added to commit but untracked files present
>>   hint: use "git add" to track
>> 
>> This way, we give future git usability hackers the space to elaborate
>> further on why a certain flag or command was recommended.
>> 
> 
> I'm suggesting a change in (output) behaviour (hint vs. no hint), which
> one may even consider to be a bug fix in terms of matching the obvious
> expections related to advice.statusHints false.
> 
> You're suggesting a different presentation of the output. In fact, I
> noticed inconsistent capitalisation in the hints which should be
> adjusted, maybe together with the presentation.
> 
> But I deem both changes (overlapping though) unrelated.

Perhaps git should introduce helper commands, similar to 'die', 'warn'
and 'error', but for hints and advices, e.g. hint(bool, "<string>")
which would print advice on its own line (like 'die' and 'warn') with
appropriate prefix if advices, and e.g. 'advice', which would return
either empty string or string with advice (a bit like 'error').

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2010-04-23 18:32 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
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 [this message]
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=m3aasudnzy.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=rctay89@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).