grep portability fix: don't use "-e" or "-q"
[gitweb.git] / t / t3404-rebase-interactive.sh
index 62e65d704b37eb92509a8ad7e844cea8a675ed50..f09823106fa75f668291d94039746adac16b6880 100755 (executable)
@@ -61,7 +61,7 @@ test_expect_success 'setup' '
        git tag I
 '
 
-echo "#!$SHELL" >fake-editor
+echo "#!$SHELL_PATH" >fake-editor.sh
 cat >> fake-editor.sh <<\EOF
 case "$1" in
 */COMMIT_EDITMSG)
@@ -149,8 +149,7 @@ test_expect_success 'stop on conflicting pick' '
        diff -u expect .git/.dotest-merge/patch &&
        diff -u expect2 file1 &&
        test 4 = $(grep -v "^#" < .git/.dotest-merge/done | wc -l) &&
-       test 0 = $(grep -ve "^#" -e "^$" < .git/.dotest-merge/git-rebase-todo |
-               wc -l)
+       test 0 = $(grep -c "^[^#]" < .git/.dotest-merge/git-rebase-todo)
 '
 
 test_expect_success 'abort' '