Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2011-05-10 03:53:00 +0400
committerJunio C Hamano <gitster@pobox.com>2011-05-10 04:02:08 +0400
commit587ac8c9d4b4a9e054dddb4779f6206fde5950ef (patch)
treeed4dc6591ad1ba1fa45789b60c76946021d44c63 /t/t7501-commit.sh
parent1020d08786c1413d488845f9175d01c0ea073a6c (diff)
t7501.8: feed a meaningful command
The command expects "git commit --interactive <path>" to fail because you cannot (yet) limit "commit --interactive" with a pathspec, but even if the command allowed to take <path>, the test would have failed as saying just 7:quit would leave the index the same as the current commit, leading to an attempt to create an empty commit that would fail without --allow-empty. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7501-commit.sh')
-rwxr-xr-xt/t7501-commit.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index a76c474195..3d2b14d303 100755
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -41,10 +41,12 @@ test_expect_success \
"echo King of the bongo >file &&
test_must_fail git commit -m foo -a file"
-test_expect_success PERL \
- "using paths with --interactive" \
- "echo bong-o-bong >file &&
- ! (echo 7 | git commit -m foo --interactive file)"
+test_expect_success PERL 'cannot use paths with --interactive' '
+ echo bong-o-bong >file &&
+ # 2: update, 1:st path, that is all, 7: quit
+ ( echo 2; echo 1; echo; echo 7 ) |
+ test_must_fail git commit -m foo --interactive file
+'
test_expect_success \
"using invalid commit with -C" \