From: Johannes Schindelin <johannes.schindelin@xxxxxx> In shallow/partial clones, we _expect_ commits to be missing. Let's teach the merge-base logic to ignore those and simply go ahead and treat the involved commit histories as cut off at that point. Signed-off-by: Johannes Schindelin <johannes.schindelin@xxxxxx> --- commit-reach.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/commit-reach.c b/commit-reach.c index 25b39c302a8..4af60c2501d 100644 --- a/commit-reach.c +++ b/commit-reach.c @@ -10,6 +10,8 @@ #include "tag.h" #include "commit-reach.h" #include "ewah/ewok.h" +#include "shallow.h" +#include "promisor-remote.h" /* Remember to update object flag allocation in object.h */ #define PARENT1 (1u<<16) @@ -115,7 +117,9 @@ static int paint_down_to_common(struct repository *r, * dispatched with a `die()`. */ free_commit_list(*result); - if (ignore_missing_commits) + if (ignore_missing_commits || + is_repository_shallow(r) || + repo_has_promisor_remote(r)) return 0; return error(_("could not parse commit %s"), oid_to_hex(&p->object.oid)); -- gitgitgadget