| 2681 | }; |
| 2682 | |
| 2683 | static int reftable_fsck_error_handler(struct reftable_fsck_info *info, |
| 2684 | void *cb_data) |
| 2685 | { |
| 2686 | struct fsck_ref_report report = { .path = info->path }; |
| 2687 | struct fsck_options *o = cb_data; |
| 2688 | enum fsck_msg_id msg_id; |
| 2689 | |
| 2690 | if (info->error < 0 || info->error >= REFTABLE_FSCK_MAX_VALUE) |
| 2691 | BUG("unknown fsck error: %d", (int)info->error); |
| 2692 | |
| 2693 | msg_id = fsck_msg_id_map[info->error]; |
| 2694 | |
| 2695 | if (!msg_id) |
| 2696 | BUG("fsck_msg_id value missing for reftable error: %d", (int)info->error); |
| 2697 | |
| 2698 | return fsck_report_ref(o, &report, msg_id, "%s", info->msg); |
| 2699 | } |
| 2700 | |
| 2701 | static int reftable_be_fsck(struct ref_store *ref_store, struct fsck_options *o, |
| 2702 | struct worktree *wt) |
nothing calls this directly
no test coverage detected