shortlog: warn the user when there is no input
authorMichele Ballabio <barra_cuda@katamail.com>
Wed, 24 Feb 2010 20:49:03 +0000 (21:49 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Feb 2010 20:59:09 +0000 (12:59 -0800)
commit3731449591130b2f5ca7257c46721785a6340a18
tree870eecb5cd1caed3b81d8a911e6cdb92959001b6
parente923eaeb901ff056421b9007adcbbce271caa7b6
shortlog: warn the user when there is no input

A simple "git shortlog" outside of a git repository stalls
waiting for an input. Check if that's the case by testing with
isatty() before read_from_stdin(), and warn the user like
"git commit" does in a similar case.

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-shortlog.c