Skip to content

Commit a74c738

Browse files
committed
Restore blame for stash
1 parent 6c77c61 commit a74c738

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/diff.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -647,13 +647,6 @@ diff_trace_origin(struct view *view, struct line *line)
647647
struct blame_header header;
648648
struct blame_commit commit;
649649

650-
if (!commit_line) {
651-
report("Failed to read the commit ID");
652-
return REQ_NONE;
653-
}
654-
655-
string_copy_rev_from_commit_line(id, box_text(commit_line));
656-
657650
if (!diff || !chunk || chunk == line || diff < commit_line) {
658651
report("The line to trace must be inside a diff chunk");
659652
return REQ_NONE;
@@ -695,6 +688,11 @@ diff_trace_origin(struct view *view, struct line *line)
695688
}
696689
}
697690

691+
if (commit_line)
692+
string_copy_rev_from_commit_line(id, box_text(commit_line));
693+
else
694+
string_copy(id, view->vid);
695+
698696
if (chunk_marker == '-')
699697
string_format(ref, "%s^", id);
700698
else

0 commit comments

Comments
 (0)