summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0887465)
raw | patch | inline | side by side (parent: 0887465)
author | Junio C Hamano <gitster@pobox.com> | |
Thu, 2 Aug 2007 01:14:41 +0000 (18:14 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 2 Aug 2007 01:15:43 +0000 (18:15 -0700) |
[jc: adjusted t/t7501 as this makes -F and --amend compatible]
Signed-off-by: David Kastrup <dak@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: David Kastrup <dak@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-commit.sh | patch | blob | history | |
t/t7501-commit.sh | patch | blob | history |
diff --git a/git-commit.sh b/git-commit.sh
index 4290ae2dd2747b26c521300af1ed5e46ab839264..d7e7028c15aeceaf2ba64a82ee9fc15f54b20eaa 100755 (executable)
--- a/git-commit.sh
+++ b/git-commit.sh
;;
--a|--am|--ame|--amen|--amend)
amend=t
- log_given=t$log_given
use_commit=HEAD
shift
;;
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
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index 8cc2cd9e60922f624e41d4397ea2778f4ade170c..6bd3c9e3e0e1f4433a0b71dc8b930c77736e460d 100644 (file)
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
test_expect_failure \
"invalid options 1" \
- "git-commit --amend -F file"
+ "git-commit -m foo -m bar -F file"
test_expect_failure \
"invalid options 2" \
"VISUAL=./editor git-commit --amend"
test_expect_failure \
- "passing --amend and -F" \
+ "passing -m and -F" \
"echo 'enough with the bongos' >file && \
- git-commit -F msg --amend ."
+ git-commit -F msg -m amending ."
test_expect_success \
"using message from other commit" \