]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/blame.c
Merge branch 'es/blame-L-more'
[thirdparty/git.git] / builtin / blame.c
index f932112e72f42fcfcb418109ecd7c08c3522d4f5..aa1abb6d5e19ed60197a477a8b4bafa6fbd20c76 100644 (file)
@@ -2495,13 +2495,13 @@ parse_done:
        bottom = top = 0;
        if (bottomtop)
                prepare_blame_range(&sb, bottomtop, lno, &bottom, &top);
+       if (lno < top || ((lno || bottom) && lno < bottom))
+               die("file %s has only %lu lines", path, lno);
        if (bottom < 1)
                bottom = 1;
        if (top < 1)
                top = lno;
        bottom--;
-       if (lno < top || lno < bottom)
-               die("file %s has only %lu lines", path, lno);
 
        ent = xcalloc(1, sizeof(*ent));
        ent->lno = bottom;