On 29 May 2018 at 17:50, Duy Nguyen <pclouds@xxxxxxxxx> wrote: > 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. Hmm, that's interesting. Deciding based on what has already been output seems feasible, although it sounds like the potential target of infinite tweaking of some central logic for deciding which way to go. Or, lots of various places to try and make consistent. I am tempted towards indenting with spaces in v2, and to leave "hint: " alone as an outlier. (It always was one. :-/ ) I'll keep your feedback in mind. Thanks, Martin