| 1687 | } |
| 1688 | |
| 1689 | static int reftable_be_optimize_required(struct ref_store *ref_store, |
| 1690 | struct refs_optimize_opts *opts, |
| 1691 | bool *required) |
| 1692 | { |
| 1693 | struct reftable_ref_store *refs = reftable_be_downcast(ref_store, REF_STORE_READ, |
| 1694 | "optimize_refs_required"); |
| 1695 | struct reftable_stack *stack; |
| 1696 | bool use_heuristics = false; |
| 1697 | |
| 1698 | if (refs->err) |
| 1699 | return refs->err; |
| 1700 | |
| 1701 | stack = refs->worktree_backend.stack; |
| 1702 | if (!stack) |
| 1703 | stack = refs->main_backend.stack; |
| 1704 | |
| 1705 | if (opts->flags & REFS_OPTIMIZE_AUTO) |
| 1706 | use_heuristics = true; |
| 1707 | |
| 1708 | return reftable_stack_compaction_required(stack, use_heuristics, |
| 1709 | required); |
| 1710 | } |
| 1711 | |
| 1712 | struct write_create_symref_arg { |
| 1713 | struct reftable_ref_store *refs; |
nothing calls this directly
no test coverage detected