Skip to content

Commit 3e3e1ef

Browse files
committed
t4203: do not let "git shortlog" DWIM based on tty
The "shortlog" command defaults to HEAD only when its standard input is connected to a terminal; otherwise it acts in the traditional "filter" mode to read and summarize the "git log" output. Two new tests added to t4203 assumed that the command always default to HEAD, but when the standard input is closed (or connected to /dev/null), it output empty, which is a summary of its empty input, causing the test to break. Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent bfdfa3d commit 3e3e1ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t4203-mailmap.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ test_expect_success 'name entry after email entry' '
114114
mkdir -p internal_mailmap &&
115115
echo "<bugs@company.xy> <bugs@company.xx>" >internal_mailmap/.mailmap &&
116116
echo "Internal Guy <bugs@company.xx>" >>internal_mailmap/.mailmap &&
117-
git shortlog >actual &&
117+
git shortlog HEAD >actual &&
118118
test_cmp expect actual
119119
'
120120

@@ -131,7 +131,7 @@ test_expect_success 'name entry after email entry, case-insensitive' '
131131
mkdir -p internal_mailmap &&
132132
echo "<bugs@company.xy> <bugs@company.xx>" >internal_mailmap/.mailmap &&
133133
echo "Internal Guy <BUGS@Company.xx>" >>internal_mailmap/.mailmap &&
134-
git shortlog >actual &&
134+
git shortlog HEAD >actual &&
135135
test_cmp expect actual
136136
'
137137

0 commit comments

Comments
 (0)