Re: [RFC PATCH 2/3] usage: prefix all lines in `vreportf()`, not just the first

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 29, 2018 at 6:49 AM, Martin Ågren <martin.agren@xxxxxxxxx> wrote:
> On 28 May 2018 at 23:45, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>> Duy Nguyen <pclouds@xxxxxxxxx> writes:
>>
>>>>> +error:       sub/added
>>>>> +error:       sub/addedtoo
>>>>> +error: Please move or remove them before you switch branches.
>>>>>  Aborting
>>>>>  EOF
>>>>
>>>> This shows the typical effect of this series, which (I subjectively
>>>> think) gives us a more pleasant end-user experience.
>>>
>>> Also, very subjectively, I'm torn about this. To me, just one
>>> "error/warning/fatal" at the start of the first paragraph feels much
>>> better. If we have to somehow mark the second paragraph that "this is
>>> also part of the error message" then it's probably better to rephrase.
>
> Would you feel the same about "hint: "? We already do prefix all the
> lines there. It seems to we we should probably do the same for "hint: "
> as for "warning: ", whatever we decide is right.

It may depend on context. Let's look at the commit that introduces
this "hint:" prefix, 38ef61cfde (advice: Introduce
error_resolve_conflict - 2011-08-04). The example in the commit
message shows the hint paragraph sandwiched by an error and a fatal
one:

      error: 'commit' is not possible because you have unmerged files.
      hint: Fix them up in the work tree ...
      hint: ...
      fatal: Exiting because of an unresolved conflict.

I think in this case (dense paragraphs of different message types) yes
it might make sense to prefix lines with "hint:". But when there's
only one type of message like the "error" part quoted at the top, it
feels too verbose to have error: prefix everywhere.
-- 
Duy




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux