MCPcopy Create free account
hub / github.com/git/git / reftable_fsck_error_handler

Function reftable_fsck_error_handler

refs/reftable-backend.c:2683–2699  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2681};
2682
2683static 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
2701static int reftable_be_fsck(struct ref_store *ref_store, struct fsck_options *o,
2702 struct worktree *wt)

Callers

nothing calls this directly

Calls 1

fsck_report_refFunction · 0.85

Tested by

no test coverage detected