Re: [PATCH] Improve parent blame to detect renames by using the previous information
From: Jonas Fonseca <hidden>
Date: 2016-06-15 22:48:56
On Sun, Jun 6, 2010 at 18:35, Jeff King [off-list ref] wrote:
On Sat, Jun 05, 2010 at 03:56:05PM -0400, Jonas Fonseca wrote: One minor bug:quoted
@@ -5204,10 +5148,13 @@ blame_request(struct view *view, enum request request, struct line *line)break; case REQ_PARENT: - if (check_blame_commit(blame, TRUE) && - select_commit_parent(blame->commit->id, opt_ref, - blame->commit->filename)) { - string_copy(opt_file, blame->commit->filename); + if (!check_blame_commit(blame, TRUE)) + break; + if (!*blame->commit->parent_id) { + report("The selected commit has no parents"); + } else { + string_copy_rev(opt_ref, blame->commit->parent_id); + string_copy_rev(opt_file, blame->commit->parent_filename);This second string_copy_rev should be a string_ncopy, shouldn't it?
Oh, yes, a regular copy and paste bug. Thanks for noticing. I will include this and consider tagging another release. -- Jonas Fonseca