#include "decorate.h"
#include "prio-queue.h"
#include "tree.h"
-#include "ref-filter.c"
+#include "ref-filter.h"
#include "revision.h"
#include "tag.h"
#include "commit-reach.h"
int i;
uint32_t last_gen = GENERATION_NUMBER_INFINITY;
+ if (!min_generation)
+ queue.compare = compare_commits_by_commit_date;
+
one->object.flags |= PARENT1;
if (!n) {
commit_list_append(one, &result);
struct commit_list *parents;
int flags;
- if (commit->generation > last_gen)
+ if (min_generation && commit->generation > last_gen)
BUG("bad generation skip %8x > %8x at %s",
commit->generation, last_gen,
oid_to_hex(&commit->object.oid));
{
if (!with_commit)
return 1;
- while (with_commit) {
- struct commit *other;
- other = with_commit->item;
- with_commit = with_commit->next;
- if (in_merge_bases(other, commit))
- return 1;
+ if (generation_numbers_enabled(the_repository)) {
+ struct commit_list *from_list = NULL;
+ int result;
+ commit_list_insert(commit, &from_list);
+ result = can_all_from_reach(from_list, with_commit, 0);
+ free_commit_list(from_list);
+ return result;
+ } else {
+ while (with_commit) {
+ struct commit *other;
+
+ other = with_commit->item;
+ with_commit = with_commit->next;
+ if (in_merge_bases(other, commit))
+ return 1;
+ }
+ return 0;
}
- return 0;
}
/*