From 8efdc326c9681e814d79e8da6097c187388dc0c4 Mon Sep 17 00:00:00 2001 From: Fredrik Kuivinen Date: Fri, 10 Mar 2006 10:21:39 +0100 Subject: rev-lib: Make it easy to do rename tracking (take 2) prune_fn in the rev_info structure is called in place of try_to_simplify_commit. This makes it possible to do rename tracking with a custom try_to_simplify_commit-like function. This commit also introduces init_revisions which initialises the rev_info structure with default values. Signed-off-by: Fredrik Kuivinen Signed-off-by: Junio C Hamano --- rev-list.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rev-list.c') diff --git a/rev-list.c b/rev-list.c index 8e4d83efba..812d237f47 100644 --- a/rev-list.c +++ b/rev-list.c @@ -190,7 +190,7 @@ static int count_distance(struct commit_list *entry) if (commit->object.flags & (UNINTERESTING | COUNTED)) break; - if (!revs.paths || (commit->object.flags & TREECHANGE)) + if (!revs.prune_fn || (commit->object.flags & TREECHANGE)) nr++; commit->object.flags |= COUNTED; p = commit->parents; @@ -224,7 +224,7 @@ static struct commit_list *find_bisection(struct commit_list *list) nr = 0; p = list; while (p) { - if (!revs.paths || (p->item->object.flags & TREECHANGE)) + if (!revs.prune_fn || (p->item->object.flags & TREECHANGE)) nr++; p = p->next; } @@ -234,7 +234,7 @@ static struct commit_list *find_bisection(struct commit_list *list) for (p = list; p; p = p->next) { int distance; - if (revs.paths && !(p->item->object.flags & TREECHANGE)) + if (revs.prune_fn && !(p->item->object.flags & TREECHANGE)) continue; distance = count_distance(p); -- cgit v1.2.1