Git development
 help / color / mirror / Atom feed
From: "Peter Eriksen" <s022018@student.dtu.dk>
To: git@vger.kernel.org
Subject: [PATCH] Documentation: --amend cannot be combined with -c/-C/-F.
Date: Wed, 24 Jan 2007 20:54:46 +0100	[thread overview]
Message-ID: <20070124195446.GA13817@bohr.gbar.dtu.dk> (raw)

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>
---

This problem was reported by tko on #git.  What do you think?
It is not a "complete" fix, since --reuse, and --reedit have the same
problem, but they are not even mentioned in the man page of git-commit. 

 Documentation/git-commit.txt |    4 ++--
 git-commit.sh                |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 532703a..2187eee 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] [-s] [-v] [(-c | -C) <commit> | -F <file> | -m <msg>]
-	   [--no-verify] [--amend] [-e] [--author <author>]
+'git-commit' [-a] [-s] [-v] [(-c | -C) <commit> | -F <file> | -m <msg> |
+	    --amend] [--no-verify] [-e] [--author <author>]
 	   [--] [[-i | -o ]<file>...]
 
 DESCRIPTION
diff --git a/git-commit.sh b/git-commit.sh
index 6f4dcdb..830ba76 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -3,7 +3,7 @@
 # Copyright (c) 2005 Linus Torvalds
 # Copyright (c) 2006 Junio C Hamano
 
-USAGE='[-a] [-s] [-v] [--no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit>] [-u] [--amend] [-e] [--author <author>] [[-i | -o] <path>...]'
+USAGE='[-a] [-s] [-v] [--no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit> | --amend] [-u] [-e] [--author <author>] [[-i | -o] <path>...]'
 SUBDIRECTORY_OK=Yes
 . git-sh-setup
 require_work_tree
@@ -284,9 +284,9 @@ esac
 
 case "$log_given" in
 tt*)
-	die "Only one of -c/-C/-F can be used." ;;
+	die "Only one of -c/-C/-F/--a can be used." ;;
 *tm*|*mt*)
-	die "Option -m cannot be combined with -c/-C/-F." ;;
+	die "Option -m cannot be combined with -c/-C/-F/--a." ;;
 esac
 
 case "$#,$also,$only,$amend" in
-- 
1.5.0.rc2.gc9a89-dirty

             reply	other threads:[~2007-01-24 19:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-24 19:54 Peter Eriksen [this message]
2007-01-25 12:29 ` [PATCH] Documentation: --amend cannot be combined with -c/-C/-F Mark Wooding
2007-01-25 22:21   ` Junio C Hamano
2007-01-25 22:38     ` Matthias Lederhofer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070124195446.GA13817@bohr.gbar.dtu.dk \
    --to=s022018@student.dtu.dk \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox