| 2713 | } |
| 2714 | |
| 2715 | static int check_and_collect_until(const char *refname UNUSED, |
| 2716 | struct object_id *o_oid UNUSED, |
| 2717 | struct object_id *n_oid, |
| 2718 | const char *ident UNUSED, |
| 2719 | timestamp_t timestamp, int tz UNUSED, |
| 2720 | const char *message UNUSED, void *cb_data) |
| 2721 | { |
| 2722 | struct commit *commit; |
| 2723 | struct check_and_collect_until_cb_data *cb = cb_data; |
| 2724 | |
| 2725 | /* An entry was found. */ |
| 2726 | if (oideq(n_oid, &cb->remote_commit->object.oid)) |
| 2727 | return 1; |
| 2728 | |
| 2729 | if ((commit = lookup_commit_reference(the_repository, n_oid))) |
| 2730 | commit_stack_push(cb->local_commits, commit); |
| 2731 | |
| 2732 | /* |
| 2733 | * If the reflog entry timestamp is older than the remote ref's |
| 2734 | * latest reflog entry, there is no need to check or collect |
| 2735 | * entries older than this one. |
| 2736 | */ |
| 2737 | if (timestamp < cb->remote_reflog_timestamp) |
| 2738 | return -1; |
| 2739 | |
| 2740 | return 0; |
| 2741 | } |
| 2742 | |
| 2743 | #define MERGE_BASES_BATCH_SIZE 8 |
| 2744 |
nothing calls this directly
no test coverage detected