Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:02:59

Slavomir Vlcek [off-list ref] 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.
quoted hunk
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
 -----------
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help