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>

Jeff King committed May 9, 2011 at 16:53 UTC 587ac8c9d4b4a9e054dddb4779f6206fde5950ef
1 file changed +6 -4
t/t7501-commit.sh
+6 -4
@@ -41,10 +41,12 @@ test_expect_success \
41 "echo King of the bongo >file &&
42 test_must_fail git commit -m foo -a file"
43
44 -test_expect_success PERL \
45 - "using paths with --interactive" \
46 - "echo bong-o-bong >file &&
47 - ! (echo 7 | git commit -m foo --interactive file)"
44 +test_expect_success PERL 'cannot use paths with --interactive' '
45 + echo bong-o-bong >file &&
46 + # 2: update, 1:st path, that is all, 7: quit
47 + ( echo 2; echo 1; echo; echo 7 ) |
48 + test_must_fail git commit -m foo --interactive file
49 +'
50
51 test_expect_success \
52 "using invalid commit with -C" \