/*
* Is "commit" a descendant of one of the elements on the "with_commit" list?
*/
-static int repo_is_descendant_of(struct repository *r,
- struct commit *commit,
- struct commit_list *with_commit)
+int repo_is_descendant_of(struct repository *r,
+ struct commit *commit,
+ struct commit_list *with_commit)
{
if (!with_commit)
return 1;
}
}
-int is_descendant_of(struct commit *commit, struct commit_list *with_commit)
-{
- return repo_is_descendant_of(the_repository, commit, with_commit);
-}
-
/*
* Is "commit" an ancestor of one of the "references"?
*/
return 0;
commit_list_insert(old_commit, &old_commit_list);
- ret = is_descendant_of(new_commit, old_commit_list);
+ ret = repo_is_descendant_of(the_repository,
+ new_commit, old_commit_list);
free_commit_list(old_commit_list);
return ret;
}
{
if (filter->with_commit_tag_algo)
return contains_tag_algo(commit, list, cache) == CONTAINS_YES;
- return is_descendant_of(commit, list);
+ return repo_is_descendant_of(the_repository, commit, list);
}
static int compare_commits_by_gen(const void *_a, const void *_b)