Code

Blame view: fix reloading of the diff view for changes not yet committed
authorJonas Fonseca <fonseca@diku.dk>
Fri, 23 Jan 2009 11:37:08 +0000 (12:37 +0100)
committerJonas Fonseca <fonseca@diku.dk>
Fri, 23 Jan 2009 11:37:08 +0000 (12:37 +0100)
The regression was introduced in e00ea5d (Blame: do to not reload the
diff view for same commits).

tig.c

diff --git a/tig.c b/tig.c
index 88338d0f2832b59f6390d56a8f100efe0bac948a..010efc547832c208621b1e73ba6776e2649b092f 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -4184,6 +4184,8 @@ blame_request(struct view *view, enum request request, struct line *line)
                }
 
                open_view(view, REQ_VIEW_DIFF, flags);
+               if (VIEW(REQ_VIEW_DIFF)->pipe && !strcmp(blame->commit->id, NULL_ID))
+                       string_copy_rev(VIEW(REQ_VIEW_DIFF)->ref, NULL_ID);
                break;
 
        default: