Documentation: --amend cannot be combined with -c/-C/-F.
We used to get the following confusing error message: $ git commit --amend -a -m foo Option -m cannot be combined with -c/-C/-F This is because --amend cannot be combined with -c/-C/-F, which makes sense, because they try to handle the same log message in different ways. So update the documentation to reflect this. Signed-off-by: Peter Eriksen <s022018@student.dtu.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
Peter Eriksen committed
Jan 24, 2007 at 20:54 UTC
497171e765b7b4f903d21379bee050380e539cf3
2 files changed
+5
-5
Documentation/git-commit.txt
+2
-2
@@ -8,8 +8,8 @@ git-commit - Record changes to the repository
8
SYNOPSIS
9
--------
10
[verse]
11
-'git-commit' [-a] [-s] [-v] [(-c | -C) <commit> | -F <file> | -m <msg>]
12
- [--no-verify] [--amend] [-e] [--author <author>]
11
+'git-commit' [-a] [-s] [-v] [(-c | -C) <commit> | -F <file> | -m <msg> |
12
+ --amend] [--no-verify] [-e] [--author <author>]
13
[--] [[-i | -o ]<file>...]
14
15
DESCRIPTION
git-commit.sh
+3
-3
@@ -3,7 +3,7 @@
3
# Copyright (c) 2005 Linus Torvalds
4
# Copyright (c) 2006 Junio C Hamano
5
6
-USAGE='[-a] [-s] [-v] [--no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit>] [-u] [--amend] [-e] [--author <author>] [[-i | -o] <path>...]'
6
+USAGE='[-a] [-s] [-v] [--no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit> | --amend] [-u] [-e] [--author <author>] [[-i | -o] <path>...]'
7
SUBDIRECTORY_OK=Yes
8
. git-sh-setup
9
require_work_tree
@@ -284,9 +284,9 @@ esac
284
285
case "$log_given" in
286
tt*)
287
- die "Only one of -c/-C/-F can be used." ;;
287
+ die "Only one of -c/-C/-F/--amend can be used." ;;
288
*tm*|*mt*)
289
- die "Option -m cannot be combined with -c/-C/-F." ;;
289
+ die "Option -m cannot be combined with -c/-C/-F/--amend." ;;
290
esac
291
292
case "$#,$also,$only,$amend" in