From: Junio C Hamano Date: Wed, 20 Oct 2010 06:32:06 +0000 (-0700) Subject: t4203: do not let "git shortlog" DWIM based on tty X-Git-Tag: v1.7.3.3~14^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3e3e1ef53285ceafd24bd88483c03a4cb604fe22;p=git.git 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 --- diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh index a267d0734..e818de6dd 100755 --- a/t/t4203-mailmap.sh +++ b/t/t4203-mailmap.sh @@ -114,7 +114,7 @@ test_expect_success 'name entry after email entry' ' mkdir -p internal_mailmap && echo " " >internal_mailmap/.mailmap && echo "Internal Guy " >>internal_mailmap/.mailmap && - git shortlog >actual && + git shortlog HEAD >actual && test_cmp expect actual ' @@ -131,7 +131,7 @@ test_expect_success 'name entry after email entry, case-insensitive' ' mkdir -p internal_mailmap && echo " " >internal_mailmap/.mailmap && echo "Internal Guy " >>internal_mailmap/.mailmap && - git shortlog >actual && + git shortlog HEAD >actual && test_cmp expect actual '