# [PATCH] docs/pretty-formats: stress that %- removes all preceding line-feeds

2 messages from 2017-06-15 to 2017-06-16. Participants: SZEDER Gábor, Jonathan Nieder.
Thread: https://gitlist.dev/t/46186

## SZEDER Gábor, 2017-06-15 10:36

Subject: [PATCH] docs/pretty-formats: stress that %- removes all preceding line-feeds
Message-ID: <20170615103607.11119-1-szeder.dev@gmail.com>
URL: https://gitlist.dev/e/20170615103607.11119-1-szeder.dev%40gmail.com

```
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
---

A mere plural "line-feeds" was too subtle for me to grasp on first
(and second...) reading.

 Documentation/pretty-formats.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index 38040e95b..a48d267e2 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -213,8 +213,8 @@ If you add a `+` (plus sign) after '%' of a placeholder, a line-feed
 is inserted immediately before the expansion if and only if the
 placeholder expands to a non-empty string.
 
-If you add a `-` (minus sign) after '%' of a placeholder, line-feeds that
-immediately precede the expansion are deleted if and only if the
+If you add a `-` (minus sign) after '%' of a placeholder, all consecutive
+line-feeds immediately preceding the expansion are deleted if and only if the
 placeholder expands to an empty string.
 
 If you add a ` ` (space) after '%' of a placeholder, a space
-- 
2.13.1.505.g7cc9fcafb


```

## Jonathan Nieder, 2017-06-16 18:30

Subject: Re: [PATCH] docs/pretty-formats: stress that %- removes all preceding line-feeds
Message-ID: <20170616183034.GY133952@aiede.mtv.corp.google.com>
URL: https://gitlist.dev/e/20170616183034.GY133952%40aiede.mtv.corp.google.com
In-Reply-To: <20170615103607.11119-1-szeder.dev@gmail.com>

```
SZEDER Gábor wrote:

> Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
> ---
> A mere plural "line-feeds" was too subtle for me to grasp on first
> (and second...) reading.

This could go in the commit message.

>  Documentation/pretty-formats.txt | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

With or without such a tweak,
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

Thanks.

> diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
> index 38040e95b..a48d267e2 100644
> --- a/Documentation/pretty-formats.txt
> +++ b/Documentation/pretty-formats.txt
> @@ -213,8 +213,8 @@ If you add a `+` (plus sign) after '%' of a placeholder, a line-feed
>  is inserted immediately before the expansion if and only if the
>  placeholder expands to a non-empty string.
>  
> -If you add a `-` (minus sign) after '%' of a placeholder, line-feeds that
> -immediately precede the expansion are deleted if and only if the
> +If you add a `-` (minus sign) after '%' of a placeholder, all consecutive
> +line-feeds immediately preceding the expansion are deleted if and only if the
>  placeholder expands to an empty string.
>  
>  If you add a ` ` (space) after '%' of a placeholder, a space

```
