commit-graph: not compatible with replace objects
Create new method commit_graph_compatible(r) to check if a given repository r is compatible with the commit-graph feature. Fill the method with a check to see if replace-objects exist. Test this interaction succeeds, including ignoring an existing commit-graph and failing to write a new commit-graph. However, we do ensure that we write a new commit-graph by setting read_replace_refs to 0, thereby ignoring the replace refs. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
b775896342
commit
d6538246d3
@ -10,6 +10,8 @@ struct replace_object {
|
||||
struct object_id replacement;
|
||||
};
|
||||
|
||||
void prepare_replace_object(struct repository *r);
|
||||
|
||||
/*
|
||||
* This internal function is only declared here for the benefit of
|
||||
* lookup_replace_object(). Please do not call it directly.
|
||||
|
Reference in New Issue
Block a user