summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0421d9f)
raw | patch | inline | side by side (parent: 0421d9f)
author | Junio C Hamano <junkio@cox.net> | |
Sat, 4 Nov 2006 20:37:02 +0000 (12:37 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 4 Nov 2006 20:37:02 +0000 (12:37 -0800) |
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>
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>
builtin-pickaxe.c | patch | blob | history |
diff --git a/builtin-pickaxe.c b/builtin-pickaxe.c
index 082ff45fe84d9b6cfa08f85ac05ee2860b0d64b2..29839cd48bff68c9a1433d020ec2cdd275985db8 100644 (file)
--- a/builtin-pickaxe.c
+++ b/builtin-pickaxe.c
struct origin *target,
struct origin *parent)
{
- int last_in_target;
+ int last_in_target, made_progress;
struct blame_entry *e, split[3];
mmfile_t file_p;
char type[10];
return 0;
}
- for (e = sb->ent; e; e = e->next) {
- if (e->guilty || cmp_suspect(e->suspect, target))
- continue;
- find_copy_in_blob(sb, e, parent, split, &file_p);
- if (split[1].suspect &&
- blame_move_score < ent_score(sb, &split[1]))
- split_blame(sb, split, e);
- decref_split(split);
+ made_progress = 1;
+ while (made_progress) {
+ made_progress = 0;
+ for (e = sb->ent; e; e = e->next) {
+ if (e->guilty || cmp_suspect(e->suspect, target))
+ continue;
+ find_copy_in_blob(sb, e, parent, split, &file_p);
+ 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);
return 0;