All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] git-commit.txt: Correct option alternatives
@ 2008-06-07  0:24 Stephan Beyer
  2008-06-07  0:24 ` [PATCH 2/2] git-commit.txt: Add missing long/short options Stephan Beyer
  2008-06-07  3:34 ` [PATCH 1/2] git-commit.txt: Correct option alternatives Christian Couder
  0 siblings, 2 replies; 12+ messages in thread
From: Stephan Beyer @ 2008-06-07  0:24 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Stephan Beyer

This patch fixes the SYNOPSIS in git-commit.txt:
 * --amend is not an alternative option to -c/-C/-F/-m
 * -m and -F are not alternative options to -c/-C,
   because you can reuse authorship from a commit (-c/-C)
   but change the message (-m/-F).

Furthermore, for long-option consistency --author <author>
is changed to --author=<author>.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
---
Hi,

Dirk Süsserott's question about "minimal documentation patches" reminded me
of an obscurity I came across in the SYNOPSIS section of the git-commit manual:
 [(-c | -C) <commit> | -F <file> | -m <msg> | --amend]

It suggests that you can't do something like
  git commit --amend -C deadf00 -m "Foo is dead. Long live foo."
or that it might not be useful.


The second hunk is: --author <author> is advertised for historical
reasons (I guess), but all the other long options with an argument
are --long-opt=<arg>, e.g. --message=<msg> or --cleanup=<mode>.
(Notice the equals sign.)
Because parse_long_opt() accepts both, I changed this for consistency
reasons.

Regards,
  Stephan

 Documentation/git-commit.txt |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index c3c9f5b..c734326 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -8,8 +8,8 @@ git-commit - Record changes to the repository
 SYNOPSIS
 --------
 [verse]
-'git-commit' [-a | --interactive] [-s] [-v] [-u]
-	   [(-c | -C) <commit> | -F <file> | -m <msg> | --amend]
+'git-commit' [-a | --interactive] [-s] [-v] [-u] [--amend]
+	   [(-c | -C) <commit>] [-F <file> | -m <msg>]
 	   [--allow-empty] [--no-verify] [-e] [--author <author>]
 	   [--cleanup=<mode>] [--] [[-i | -o ]<file>...]
 
@@ -68,7 +68,7 @@ OPTIONS
 	Take the commit message from the given file.  Use '-' to
 	read the message from the standard input.
 
---author <author>::
+--author=<author>::
 	Override the author name used in the commit.  Use
 	`A U Thor <author@example.com>` format.
 
-- 
1.5.5.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-06-08  4:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-07  0:24 [PATCH 1/2] git-commit.txt: Correct option alternatives Stephan Beyer
2008-06-07  0:24 ` [PATCH 2/2] git-commit.txt: Add missing long/short options Stephan Beyer
2008-06-07 21:05   ` Junio C Hamano
2008-06-08  1:36     ` [PATCH 1/5] " Stephan Beyer
2008-06-08  1:36       ` [PATCH 2/5] Docs: Use "-l::\n--long\n" format in OPTIONS sections Stephan Beyer
2008-06-08  1:36         ` [PATCH 3/5] Docs: add some long/short options Stephan Beyer
2008-06-08  1:36           ` [PATCH 4/5] git-describe.txt: document --always Stephan Beyer
2008-06-08  1:36             ` [PATCH 5/5] git-name-rev.txt: document --no-undefined and --always Stephan Beyer
2008-06-07  3:34 ` [PATCH 1/2] git-commit.txt: Correct option alternatives Christian Couder
2008-06-07 11:06   ` [PATCH v2] " Stephan Beyer
2008-06-08  1:36     ` Jon Loeliger
2008-06-08  4:23       ` Jeff King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.