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'; ) {
- char *eol = strchr(buffer, '\n');
+ const char *eol = strchr(buffer, '\n');
if (eol == NULL)
eol = buffer + strlen(buffer);
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);
+ }
else
get_from_rev(&rev, &list);