Skip to content

Commit

Permalink
t7501.8: feed a meaningful command
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff King authored and Junio C Hamano committed May 10, 2011
1 parent 1020d08 commit 587ac8c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions t/t7501-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down

0 comments on commit 587ac8c

Please sign in to comment.