# Subject: [PATCH/RFC] Documentation/git-stripspace: Update synopsis

3 messages from 2014-11-18 to 2014-11-19. Participants: Slavomir Vlcek, Junio C Hamano.
Thread: https://gitlist.dev/t/38004

## Slavomir Vlcek, 2014-11-18 23:16

Subject: Subject: [PATCH/RFC] Documentation/git-stripspace: Update synopsis
Message-ID: <546BD367.40301@inventati.org>
URL: https://gitlist.dev/e/546BD367.40301%40inventati.org

```
Add synopsis with the '--comment-lines' option.

Signed-off-by: Slavomir Vlcek <svlc@inventati.org>
---

Hi,
there were no mention of '--comment-lines' in the synopsis.

('--comment-lines' and '--strip-comments' options
are mutually exclusive).

I solved this by adding an extra (second) synopsis line
so it looks just like the 'usage_msg' in 'builtin/stripspace.c'.

But perhaps it would be wiser to have something like
"git stripspace [[-s | --strip-comments] | [-c | --comment-lines]] < input"
instead (and perhaps ordered alphabetically).
This approach can be seen e.g. in the git-add man page.

For the 'master'.


Also, have a few questions about stripspace generally:
a) Should 'git stripspace --comment-lines' really leave the trailing
whitespace alone (example: ' hello  '->'# hello  ')?
b) In the documentation there is:
"-s, --strip-comments
           Skip and remove all lines starting with comment character (default #)."

part. This "default" word somehow suggests some new command option that would
allow to change the comment character. Would you accept a patch implementing
this or such functionality is not desired.

Thank you.


 Documentation/git-stripspace.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/git-stripspace.txt b/Documentation/git-stripspace.txt
index c87bfcb..6c6e989 100644
--- a/Documentation/git-stripspace.txt
+++ b/Documentation/git-stripspace.txt
@@ -10,6 +10,7 @@ SYNOPSIS
 --------
 [verse]
 'git stripspace' [-s | --strip-comments] < input
+'git stripspace' [-c | --comment-lines] < input
 
 DESCRIPTION
 -----------
-- 
2.0.1

```

## Slavomir Vlcek, 2014-11-18 23:29

Subject: Re: Subject: [PATCH/RFC] Documentation/git-stripspace: Update synopsis
Message-ID: <546BD65F.3070808@inventati.org>
URL: https://gitlist.dev/e/546BD65F.3070808%40inventati.org
In-Reply-To: <546BD367.40301@inventati.org>

```

On 11/19/2014 12:16 AM, Slavomir Vlcek wrote:
> b) In the documentation there is:
> "-s, --strip-comments
>            Skip and remove all lines starting with comment character (default #)."
> 
> part. This "default" word somehow suggests some new command option that would
> allow to change the comment character. Would you accept a patch implementing
> this or such functionality is not desired.

I take it back, just found that there is a global "comment_line_char" variable
that controls this stuff. Apologizing.

```

## Junio C Hamano, 2014-11-19 21:40

Subject: Re: Subject: [PATCH/RFC] Documentation/git-stripspace: Update synopsis
Message-ID: <xmqqk32qrhs1.fsf@gitster.dls.corp.google.com>
URL: https://gitlist.dev/e/xmqqk32qrhs1.fsf%40gitster.dls.corp.google.com
In-Reply-To: <546BD367.40301@inventati.org>

```
Slavomir Vlcek <svlc@inventati.org> writes:

> I solved this by adding an extra (second) synopsis line
> so it looks just like the 'usage_msg' in 'builtin/stripspace.c'.
>
> But perhaps it would be wiser to have something like
> "git stripspace [[-s | --strip-comments] | [-c | --comment-lines]] < input"
> instead (and perhaps ordered alphabetically).

That might be more "manly" but much less friendly to humans compared
to what your patch gives us.

These two modes are really about two different operations (the
latter is not "strip" at all, but is about adding spaces, to which
"comments" are often equated to), and two-line synopsis shows more
prominently that they are distinct, which I think is the right thing
to do.

> diff --git a/Documentation/git-stripspace.txt b/Documentation/git-stripspace.txt
> index c87bfcb..6c6e989 100644
> --- a/Documentation/git-stripspace.txt
> +++ b/Documentation/git-stripspace.txt
> @@ -10,6 +10,7 @@ SYNOPSIS
>  --------
>  [verse]
>  'git stripspace' [-s | --strip-comments] < input
> +'git stripspace' [-c | --comment-lines] < input
>  
>  DESCRIPTION
>  -----------

```
