git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Slavomir Vlcek <svlc@inventati.org>
Date
Nov 18, 2014, 23:16 UTC
Message-ID
<546BD367.40301@inventati.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
Next: Slavomir Vlcek
Message 1 of 3 in “Subject: [PATCH/RFC] Documentation/git-stripspace: Update synopsis”
  1. Slavomir VlcekNov 18, 2014
  2. Slavomir VlcekNov 18, 2014
  3. Junio C HamanoNov 19, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.