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

Re: [PATCH] git-commit.sh: Permit the --amend message to be given with -m/-c/-C/-F.

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 2, 2007, 01:03 UTC
Message-ID
<7vd4y63fzf.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<85zm1bq8um.fsf@lola.goethe.zz>
David Kastrup <dak@gnu.org> writes:
Show 29 quoted lines
> Signed-off-by: David Kastrup <dak@gnu.org>
> ---
>  git-commit.sh |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/git-commit.sh b/git-commit.sh
> index 4290ae2..d7e7028 100755
> --- a/git-commit.sh
> +++ b/git-commit.sh
> @@ -190,7 +190,6 @@ $1"
>  		;;
>  	--a|--am|--ame|--amen|--amend)
>  		amend=t
> -		log_given=t$log_given
>  		use_commit=HEAD
>  		shift
>  		;;
> @@ -298,9 +297,9 @@ esac
>  
>  case "$log_given" in
>  tt*)
> -	die "Only one of -c/-C/-F/--amend can be used." ;;
> +	die "Only one of -c/-C/-F can be used." ;;
>  *tm*|*mt*)
> -	die "Option -m cannot be combined with -c/-C/-F/--amend." ;;
> +	die "Option -m cannot be combined with -c/-C/-F." ;;
>  esac
>  
>  case "$#,$also,$only,$amend" in
Ok, looks obviously correct.  Wasn't too painful, was it?
Thanks, will apply.
Previous: David Kastrup
Message 7 of 7 in “git-commit --amend -m "..." complains?!?”
  1. David KastrupAug 1, 2007
  2. Junio C HamanoAug 1, 2007
  3. David KastrupAug 1, 2007
  4. Junio C HamanoAug 1, 2007
  5. David KastrupAug 1, 2007
  6. git-commit.sh: Permit the --amend message to be given with -m/-c/-C/-F.David Kastrup, Aug 1, 2007
  7. Junio C HamanoAug 2, 2007

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.