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

2018-05-30 Thread Martin Ågren
On 29 May 2018 at 23:32, Jeff King wrote: > On Mon, May 28, 2018 at 06:25:18PM +0900, Junio C Hamano wrote: > >> This shows the typical effect of this series, which (I subjectively >> think) gives us a more pleasant end-user experience. > > Heh, that is one of the cases that I found most ugly

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

2018-05-30 Thread Martin Ågren
On 29 May 2018 at 17:50, Duy Nguyen wrote: > On Tue, May 29, 2018 at 6:49 AM, Martin Ågren wrote: >> On 28 May 2018 at 23:45, Junio C Hamano wrote: >>> Duy Nguyen writes: >>> >> +error: sub/added >> +error: sub/addedtoo >> +error: Please move or remove them before you

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

2018-05-29 Thread Jeff King
On Mon, May 28, 2018 at 06:25:18PM +0900, Junio C Hamano wrote: > Martin Ågren writes: > > > diff --git a/t/t1011-read-tree-sparse-checkout.sh > > b/t/t1011-read-tree-sparse-checkout.sh > > index 0c6f48f302..31b0702e6c 100755 > > --- a/t/t1011-read-tree-sparse-checkout.sh > > +++

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

2018-05-29 Thread Duy Nguyen
On Tue, May 29, 2018 at 6:49 AM, Martin Ågren wrote: > On 28 May 2018 at 23:45, Junio C Hamano wrote: >> Duy Nguyen writes: >> > +error: sub/added > +error: sub/addedtoo > +error: Please move or remove them before you switch branches. > Aborting > EOF

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

2018-05-29 Thread Junio C Hamano
Martin Ågren writes: > About the _("\t")-approach that you mentioned up-thread. It would allow > a translator to adjust all the indentations for a particular language. > To be clear, what you mean is _(" " /* 9 spaces */) to align > nicely with "warning: ", which is the longest English

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

2018-05-29 Thread Martin Ågren
On 29 May 2018 at 07:50, Junio C Hamano wrote: > Martin Ågren writes: > >>> - allow callers to align 1st prefix (e.g. "error: ") with the >>>leading indent for the second and subsequent lines by passing the >>>second prefix with appropriate display width. >> >> I suspect this second

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

2018-05-28 Thread Junio C Hamano
Martin Ågren writes: >> - allow callers to align 1st prefix (e.g. "error: ") with the >>leading indent for the second and subsequent lines by passing the >>second prefix with appropriate display width. > > I suspect this second prefix would always consist of > strlen(first_prefix)

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

2018-05-28 Thread Martin Ågren
On 28 May 2018 at 23:45, Junio C Hamano wrote: > Duy Nguyen 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

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

2018-05-28 Thread Junio C Hamano
Duy Nguyen 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

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

2018-05-28 Thread Duy Nguyen
On Mon, May 28, 2018 at 11:25 AM, Junio C Hamano wrote: > Martin Ågren writes: > >> diff --git a/t/t1011-read-tree-sparse-checkout.sh >> b/t/t1011-read-tree-sparse-checkout.sh >> index 0c6f48f302..31b0702e6c 100755 >> --- a/t/t1011-read-tree-sparse-checkout.sh >> +++

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

2018-05-28 Thread Junio C Hamano
Martin Ågren writes: > diff --git a/t/t1011-read-tree-sparse-checkout.sh > b/t/t1011-read-tree-sparse-checkout.sh > index 0c6f48f302..31b0702e6c 100755 > --- a/t/t1011-read-tree-sparse-checkout.sh > +++ b/t/t1011-read-tree-sparse-checkout.sh > @@ -243,9 +243,9 @@

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

2018-05-25 Thread Martin Ågren
Teach `vreportf()` to prefix all lines with the given prefix, not only the first line. This matches how "hint: " is being shown, and affects "error: ", "fatal: ", "usage: ", "warning: " and "BUG: " (as well as any out-of-tree and future users). Note that we need to adjust quite a few tests as a