]> asedeno.scripts.mit.edu Git - git.git/blobdiff - builtin-shortlog.c
receive-pack: check object type of sha1 before using them as commits
[git.git] / builtin-shortlog.c
index 90666cbd78732c15566fa8050e666999615b8354..3d8d7094ab8f85f557cf3bd58e408c8ab4272f08 100644 (file)
@@ -249,9 +249,10 @@ int cmd_shortlog(int argc, const char **argv, const char *prefix)
 
        read_mailmap(&mailmap, ".mailmap", &common_repo_prefix);
 
+       /* assume HEAD if from a tty */
+       if (!rev.pending.nr && isatty(0))
+               add_head_to_pending(&rev);
        if (rev.pending.nr == 0) {
-               if (isatty(0))
-                       fprintf(stderr, "(reading log to summarize from standard input)\n");
                read_from_stdin(&list);
        }
        else