]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t4201-shortlog.sh
shortlog: disallow left-over arguments outside repo
[thirdparty/git.git] / t / t4201-shortlog.sh
index da10478f59da1a301edf7def229d37fbc964dce9..ff6649ed9a70721523da3c55142a9622b152243a 100755 (executable)
@@ -127,6 +127,11 @@ test_expect_success !MINGW 'shortlog can read --format=raw output' '
        test_cmp expect out
 '
 
+test_expect_success 'shortlog from non-git directory refuses extra arguments' '
+       test_must_fail env GIT_DIR=non-existing git shortlog foo 2>out &&
+       test_i18ngrep "too many arguments" out
+'
+
 test_expect_success 'shortlog should add newline when input line matches wraplen' '
        cat >expect <<\EOF &&
 A U Thor (2):