Merge branch 'kw/patch-ids-optim'
When "git rebase" tries to compare set of changes on the updated upstream and our own branch, it computes patch-id for all of these changes and attempts to find matches. This has been optimized by lazily computing the full patch-id (which is expensive) to be compared only for changes that touch the same set of paths. * kw/patch-ids-optim: rebase: avoid computing unnecessary patch IDs patch-ids: add flag to create the diff patch id using header only data patch-ids: replace the seen indicator with a commit pointer patch-ids: stop using a hand-rolled hashmap implementation
This commit is contained in:
18
revision.c
18
revision.c
@ -846,7 +846,7 @@ static void cherry_pick_list(struct commit_list *list, struct rev_info *revs)
|
||||
*/
|
||||
if (left_first != !!(flags & SYMMETRIC_LEFT))
|
||||
continue;
|
||||
commit->util = add_commit_patch_id(commit, &ids);
|
||||
add_commit_patch_id(commit, &ids);
|
||||
}
|
||||
|
||||
/* either cherry_mark or cherry_pick are true */
|
||||
@ -873,21 +873,9 @@ static void cherry_pick_list(struct commit_list *list, struct rev_info *revs)
|
||||
id = has_commit_patch_id(commit, &ids);
|
||||
if (!id)
|
||||
continue;
|
||||
id->seen = 1;
|
||||
|
||||
commit->object.flags |= cherry_flag;
|
||||
}
|
||||
|
||||
/* Now check the original side for seen ones */
|
||||
for (p = list; p; p = p->next) {
|
||||
struct commit *commit = p->item;
|
||||
struct patch_id *ent;
|
||||
|
||||
ent = commit->util;
|
||||
if (!ent)
|
||||
continue;
|
||||
if (ent->seen)
|
||||
commit->object.flags |= cherry_flag;
|
||||
commit->util = NULL;
|
||||
id->commit->object.flags |= cherry_flag;
|
||||
}
|
||||
|
||||
free_patch_ids(&ids);
|
||||
|
||||
Reference in New Issue
Block a user