diff options
author | Fredrik Kuivinen <freku045@student.liu.se> | 2006-03-10 10:21:39 +0100 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-03-10 22:22:00 -0800 |
commit | 8efdc326c9681e814d79e8da6097c187388dc0c4 (patch) | |
tree | eacf0f6d9bd219173b572b77a8763a382b5dd8de /rev-list.c | |
parent | 6b6dcfc297722f5a5324c4cb22f45adccd4c84ef (diff) | |
download | git-8efdc326c9681e814d79e8da6097c187388dc0c4.tar.gz git-8efdc326c9681e814d79e8da6097c187388dc0c4.tar.xz |
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 <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'rev-list.c')
-rw-r--r-- | rev-list.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rev-list.c b/rev-list.c index 8e4d83efb..812d237f4 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); |