summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-04-09 23:25:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-04-09 23:25:44 (GMT)
commit78c20b8fcaf0c46942a8c91e38076358f9a948ac (patch)
tree9f172fdddeacc813299e63bcfa3d778151e9e133 /t
parenta26e1f4b59fd6518c1f0d13eaa6b312eca4a9b14 (diff)
parent4aa0161e837ef19e52f3bc65471d9ec0f857e20d (diff)
downloadgit-78c20b8fcaf0c46942a8c91e38076358f9a948ac.zip
git-78c20b8fcaf0c46942a8c91e38076358f9a948ac.tar.gz
git-78c20b8fcaf0c46942a8c91e38076358f9a948ac.tar.bz2
Merge branch 'ma/shortlog-revparse'
"git shortlog cruft" aborted with a BUG message when run outside a Git repository. The command has been taught to complain about extra and unwanted arguments on its command line instead in such a case. * ma/shortlog-revparse: shortlog: disallow left-over arguments outside repo shortlog: add usage-string for stdin-reading git-shortlog.txt: reorder usages
Diffstat (limited to 't')
-rwxr-xr-xt/t4201-shortlog.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh
index da10478..ff6649e 100755
--- a/t/t4201-shortlog.sh
+++ b/t/t4201-shortlog.sh
@@ -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):