| # Copyright (c) 2006 Johannes E. Schindelin |
| test_description='git shortlog |
| commit=$( (echo "Test"; echo) | git commit-tree $tree ) |
| git update-ref HEAD $commit |
| git commit --quiet -m "This is a very, very long first line for the commit message to see if it is wrapped correctly" a1 |
| # test if the wrapping is still valid when replacing all i's by treble clefs. |
| git commit --quiet -m "$(echo "This is a very, very long first line for the commit message to see if it is wrapped correctly" | sed "s/i/1234/g" | tr 1234 '\360\235\204\236')" a1 |
| git config i18n.commitencoding non-utf-8 |
| git commit --quiet -m "$(echo "This is a very, very long first line for the commit message to see if it is wrapped correctly" | sed "s/i/1234/g" | tr 1234 '\370\235\204\236')" a1 |
| git commit --quiet -m "a 12 34 56 78" a1 |
| git shortlog -w HEAD > out |
| This is a very, very long first line for the commit message to see if |
| Thðs ðs a very, very long fðrst lðne for the commðt message to see ðf |
| ðt ðs wrapped correctly |
| Thøs øs a very, very long først løne for the commøt |
| message to see øf øt øs wrapped correctly |
| test_expect_success 'shortlog wrapping' 'test_cmp expect out' |
| GIT_DIR=non-existing git shortlog -w < log > out |
| test_expect_success 'shortlog from non-git directory' 'test_cmp expect out' |