builtin-fsck: reports missing parent commits
[gitweb.git] / builtin-rev-list.c
index 1cb5f67119a37b8490c76f4846372ba28a316fbf..14e86ceabc954eb979d56ef67eaccb6e47e56dbe 100644 (file)
@@ -520,7 +520,7 @@ static void read_revisions_from_stdin(struct rev_info *revs)
 
        while (fgets(line, sizeof(line), stdin) != NULL) {
                int len = strlen(line);
-               if (line[len - 1] == '\n')
+               if (len && line[len - 1] == '\n')
                        line[--len] = 0;
                if (!len)
                        break;
@@ -605,7 +605,6 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
                usage(rev_list_usage);
 
        save_commit_buffer = revs.verbose_header || revs.grep_filter;
-       track_object_refs = 0;
        if (bisect_list)
                revs.limited = 1;