Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-01-29 03:10:14 +0300
committerJunio C Hamano <gitster@pobox.com>2016-01-29 03:10:14 +0300
commita1c5405a522858af39036cde8af37bbe1aaa9a38 (patch)
tree16adaa48837af8834bc135b48a3f772a22d8d114 /t
parentb62624b51a54325e6884c197352dc0dcef700325 (diff)
parentd6b16ce9147e787cce3551fc79d52b3e30c3ad3a (diff)
Merge branch 'jk/shortlog'
"git shortlog" used to accumulate various pieces of information regardless of what was asked to be shown in the final output. It has been optimized by noticing what need not to be collected (e.g. there is no need to collect the log messages when showing only the number of changes). * jk/shortlog: shortlog: don't warn on empty author shortlog: optimize out useless string list shortlog: optimize out useless "<none>" normalization shortlog: optimize "--summary" mode shortlog: replace hand-parsing of author with pretty-printer shortlog: use strbufs to read from stdin shortlog: match both "Author:" and "author" on stdin
Diffstat (limited to 't')
-rwxr-xr-xt/t4201-shortlog.sh22
1 files changed, 6 insertions, 16 deletions
diff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh
index 7600a3e3e8..f5e63670fa 100755
--- a/t/t4201-shortlog.sh
+++ b/t/t4201-shortlog.sh
@@ -120,6 +120,12 @@ test_expect_success !MINGW 'shortlog from non-git directory' '
test_cmp expect out
'
+test_expect_success !MINGW 'shortlog can read --format=raw output' '
+ git log --format=raw HEAD >log &&
+ GIT_DIR=non-existing git shortlog -w <log >out &&
+ test_cmp expect out
+'
+
test_expect_success 'shortlog should add newline when input line matches wraplen' '
cat >expect <<\EOF &&
A U Thor (2):
@@ -172,22 +178,6 @@ test_expect_success !MINGW 'shortlog encoding' '
git shortlog HEAD~2.. > out &&
test_cmp expect out'
-test_expect_success 'shortlog ignores commits with missing authors' '
- git commit --allow-empty -m normal &&
- git commit --allow-empty -m soon-to-be-broken &&
- git cat-file commit HEAD >commit.tmp &&
- sed "/^author/d" commit.tmp >broken.tmp &&
- commit=$(git hash-object -w -t commit --stdin <broken.tmp) &&
- git update-ref HEAD $commit &&
- cat >expect <<-\EOF &&
- A U Thor (1):
- normal
-
- EOF
- git shortlog HEAD~2.. >actual &&
- test_cmp expect actual
-'
-
test_expect_success 'shortlog with revision pseudo options' '
git shortlog --all &&
git shortlog --branches &&