diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2018-08-20 20:24:27 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-21 19:22:51 +0200 |
commit | d6538246d3d4edbfbc9b0af6a2aa38552d35f7f1 (patch) | |
tree | 9a21c3365c28466618eec17ef374aa77d6074c99 /replace-object.c | |
parent | test-repository: properly init repo (diff) | |
download | git-d6538246d3d4edbfbc9b0af6a2aa38552d35f7f1.tar.xz git-d6538246d3d4edbfbc9b0af6a2aa38552d35f7f1.zip |
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>
Diffstat (limited to 'replace-object.c')
-rw-r--r-- | replace-object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/replace-object.c b/replace-object.c index 3c17864eb7..9821f1477e 100644 --- a/replace-object.c +++ b/replace-object.c @@ -32,7 +32,7 @@ static int register_replace_ref(struct repository *r, return 0; } -static void prepare_replace_object(struct repository *r) +void prepare_replace_object(struct repository *r) { if (r->objects->replace_map) return; |