From 78abe4af2d7c64444ae8967e4d0ff0eeaede0d89 Mon Sep 17 00:00:00 2001 From: John Keeping Date: Fri, 23 May 2014 12:12:33 +0100 Subject: [PATCH] blame: treat HEAD as the parent of not-committed-yet When blaming a file with uncommitted changes, it is annoying that it is not possible to jump to the HEAD version from an uncommitted line. It turns out that the commit already has HEAD as its parent, so we simply need to relax the check in check_blame_commit() to allow the parent request to make it to blame_go_forward(). Signed-off-by: John Keeping --- src/blame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blame.c b/src/blame.c index ec975d5..41a1c0a 100644 --- a/src/blame.c +++ b/src/blame.c @@ -433,7 +433,7 @@ blame_request(struct view *view, enum request request, struct line *line) switch (request) { case REQ_VIEW_BLAME: case REQ_PARENT: - if (!check_blame_commit(blame, TRUE)) + if (!check_blame_commit(blame, request == REQ_VIEW_BLAME)) break; blame_go_forward(view, blame, request == REQ_PARENT); break; -- 2.11.4.GIT