Handle blaming beyond the creation of file more gracefully
authorJeff King <peff@peff.net>
Sun, 8 Feb 2009 11:00:42 +0000 (06:00 -0500)
committerJonas Fonseca <fonseca@diku.dk>
Sun, 8 Feb 2009 12:30:21 +0000 (13:30 +0100)
commitcfb6b75c4633e576675dd8eab84dc45831b3c8d7
tree24a3db6bdb96f6c91060507b5845cfe9fa95a993
parentb6d0d41e01e4e435385db260cf34fd5d9069d782
Handle blaming beyond the creation of file more gracefully

Currently when you ask to re-blame from the parent of a
commit that created the file, blame_read_file will complain
that it cannot get the file contents ("No blame exist").

At the time we try to read the file, it is too late to abort
the operation, as we have already changed to the new blame
view. However, we can detect this situation early by
limiting the selection of the parent revision to the
particular path of interest: if it returns a parent even
with path-limiting, then we know the path exists; if not,
then we know it doesn't.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
tig.c