diff --git a/builtin-shortlog.c b/builtin-shortlog.c
index 2f71a2a6e2ecf556956a0271d8af9ad852d5a93c..29343aefc843c4dd22095f559262bc6b5e381440 100644 (file)
--- a/builtin-shortlog.c
+++ b/builtin-shortlog.c
prepare_revision_walk(rev);
while ((commit = get_revision(rev)) != NULL) {
prepare_revision_walk(rev);
while ((commit = get_revision(rev)) != NULL) {
- char *author = NULL, *oneline, *buffer;
+ const char *author = NULL, *oneline, *buffer;
int authorlen = authorlen, onelinelen;
/* get author and oneline */
for (buffer = commit->buffer; buffer && *buffer != '\0' &&
*buffer != '\n'; ) {
int authorlen = authorlen, onelinelen;
/* get author and oneline */
for (buffer = commit->buffer; buffer && *buffer != '\0' &&
*buffer != '\n'; ) {
- char *eol = strchr(buffer, '\n');
+ const char *eol = strchr(buffer, '\n');
if (eol == NULL)
eol = buffer + strlen(buffer);
if (eol == NULL)
eol = buffer + strlen(buffer);
if (!access(".mailmap", R_OK))
read_mailmap(".mailmap");
if (!access(".mailmap", R_OK))
read_mailmap(".mailmap");
- if (rev.pending.nr == 0)
+ if (rev.pending.nr == 0) {
+ if (isatty(0))
+ fprintf(stderr, "(reading log to summarize from standard input)\n");
read_from_stdin(&list);
read_from_stdin(&list);
+ }
else
get_from_rev(&rev, &list);
else
get_from_rev(&rev, &list);