Allow git commit --interactive with paths
[gitweb.git] / t / t7501-commit.sh
index a76c47419590ed16c53b8d4d82c2d92c11853154..c2fd116d633351eeaa75cc4040f6e4a73670975b 100755 (executable)
@@ -41,10 +41,13 @@ 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 'can 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 ) |
+       git commit -m foo --interactive file &&
+       git reset --hard HEAD^
+'
 
 test_expect_success \
        "using invalid commit with -C" \