git-pickaxe: re-scan the blob after making progress with -M
Otherwise we would miss copied lines that are contained in the parts before or after the part that we find after splitting the blame_entry (i.e. split[0] and split[2]). Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
0421d9f812
commit
650e2f6752
@ -766,7 +766,7 @@ static int find_move_in_parent(struct scoreboard *sb,
|
|||||||
struct origin *target,
|
struct origin *target,
|
||||||
struct origin *parent)
|
struct origin *parent)
|
||||||
{
|
{
|
||||||
int last_in_target;
|
int last_in_target, made_progress;
|
||||||
struct blame_entry *e, split[3];
|
struct blame_entry *e, split[3];
|
||||||
mmfile_t file_p;
|
mmfile_t file_p;
|
||||||
char type[10];
|
char type[10];
|
||||||
@ -784,14 +784,20 @@ static int find_move_in_parent(struct scoreboard *sb,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (e = sb->ent; e; e = e->next) {
|
made_progress = 1;
|
||||||
if (e->guilty || cmp_suspect(e->suspect, target))
|
while (made_progress) {
|
||||||
continue;
|
made_progress = 0;
|
||||||
find_copy_in_blob(sb, e, parent, split, &file_p);
|
for (e = sb->ent; e; e = e->next) {
|
||||||
if (split[1].suspect &&
|
if (e->guilty || cmp_suspect(e->suspect, target))
|
||||||
blame_move_score < ent_score(sb, &split[1]))
|
continue;
|
||||||
split_blame(sb, split, e);
|
find_copy_in_blob(sb, e, parent, split, &file_p);
|
||||||
decref_split(split);
|
if (split[1].suspect &&
|
||||||
|
blame_move_score < ent_score(sb, &split[1])) {
|
||||||
|
split_blame(sb, split, e);
|
||||||
|
made_progress = 1;
|
||||||
|
}
|
||||||
|
decref_split(split);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
free(blob_p);
|
free(blob_p);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user