Skip to content

Commit

Permalink
Revert "commit-graph: when incompatible with graphs, indicate why"
Browse files Browse the repository at this point in the history
This reverts commit c85eec7, as
it is a bit overzealous, we are in prerelease freeze, and we want
to have enough time to get this right and cook in 'next'.

cf. <8735xgkvuo.fsf@evledraar.gmail.com>
  • Loading branch information
gitster committed Mar 1, 2021
1 parent c85eec7 commit cdc986a
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions commit-graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,24 +205,16 @@ static int commit_graph_compatible(struct repository *r)

if (read_replace_refs) {
prepare_replace_object(r);
if (hashmap_get_size(&r->objects->replace_map->map)) {
warning(_("repository contains replace objects; "
"skipping commit-graph"));
if (hashmap_get_size(&r->objects->replace_map->map))
return 0;
}
}

prepare_commit_graft(r);
if (r->parsed_objects &&
(r->parsed_objects->grafts_nr || r->parsed_objects->substituted_parent)) {
warning(_("repository contains (deprecated) grafts; "
"skipping commit-graph"));
(r->parsed_objects->grafts_nr || r->parsed_objects->substituted_parent))
return 0;
}
if (is_repository_shallow(r)) {
warning(_("repository is shallow; skipping commit-graph"));
if (is_repository_shallow(r))
return 0;
}

return 1;
}
Expand Down

0 comments on commit cdc986a

Please sign in to comment.