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

Re: [PATCH 2/2] wt-status: take advice.statusHints seriously

From
Jakub Narebski <jnareb@gmail.com>
Date
Apr 23, 2010, 18:31 UTC
Message-ID
<m3aasudnzy.fsf@localhost.localdomain>
In-Reply-To
<4BD155D0.5080402@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
Show 15 quoted lines
> 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...
Show 18 quoted lines
>> 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
Previous: Michael J GruberNext: Jeff King
Message 7 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.