summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e923eae)
raw | patch | inline | side by side (parent: e923eae)
author | Michele Ballabio <barra_cuda@katamail.com> | |
Wed, 24 Feb 2010 20:49:03 +0000 (21:49 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 24 Feb 2010 20:59:09 +0000 (12:59 -0800) |
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>
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 | patch | blob | history |
diff --git a/builtin-shortlog.c b/builtin-shortlog.c
index b3b055f68ce59b6b91ef6949bd8c4bd0bed68b55..22668b4d3d01d112b185fba8ae7b3a4a6948b4cf 100644 (file)
--- a/builtin-shortlog.c
+++ b/builtin-shortlog.c
if (!nongit && !rev.pending.nr && isatty(0))
add_head_to_pending(&rev);
if (rev.pending.nr == 0) {
+ if (isatty(0))
+ fprintf(stderr, "(reading log message from standard input)\n");
read_from_stdin(&log);
}
else