Skip to content

Commit

Permalink
t4203: do not let "git shortlog" DWIM based on tty
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Oct 20, 2010
1 parent bfdfa3d commit 3e3e1ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions t/t4203-mailmap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ test_expect_success 'name entry after email entry' '
mkdir -p internal_mailmap &&
echo "<bugs@company.xy> <bugs@company.xx>" >internal_mailmap/.mailmap &&
echo "Internal Guy <bugs@company.xx>" >>internal_mailmap/.mailmap &&
git shortlog >actual &&
git shortlog HEAD >actual &&
test_cmp expect actual
'

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

Expand Down

0 comments on commit 3e3e1ef

Please sign in to comment.