stash tests: stash can lose data in a file removed from the index
[gitweb.git] / builtin-blame.c
index 4094f3c06111e365c6ab6063746e5928bd2ee8a1..fc1586350f94ae48e7e48a51818517b465e7a40d 100644 (file)
@@ -1772,7 +1772,7 @@ static int lineno_width(int lines)
 {
        int i, width;
 
-       for (width = 1, i = 10; i <= lines + 1; width++)
+       for (width = 1, i = 10; i <= lines; width++)
                i *= 10;
        return width;
 }
@@ -2365,6 +2365,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
                        die_errno("cannot stat path '%s'", path);
        }
 
+       revs.disable_stdin = 1;
        setup_revisions(argc, argv, &revs, NULL);
        memset(&sb, 0, sizeof(sb));