MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / gf_batch_command

Function gf_batch_command

src/mcp/test_impact_git.c:1941–1955  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1939}
1940
1941static bool gf_batch_command(gf_batch_work_t *work, size_t first, size_t count, bool payload,
1942 cbm_git_facts_error_t *error) {
1943 const char *args[] = {"cat-file",
1944 payload ? "--batch=%(objectname) %(objecttype) %(objectsize)"
1945 : "--batch-check=%(objectname) %(objecttype) %(objectsize)"};
1946 cbm_git_bytes_t input = {work->lines + first * work->line_length, count * work->line_length};
1947 gf_result_t result;
1948 if (!gf_run_input(work->facts, args, 2, false, &input, &result, error))
1949 return false;
1950 gf_batch_frames_t frames = {.width = work->facts->identity.oid_hex_length,
1951 .count = count,
1952 .objects = work->objects + first,
1953 .has_payload = payload};
1954 return gf_batch_capture(work->facts, result.out, &frames, error);
1955}
1956
1957static bool gf_batch_preflight(gf_batch_work_t *work, cbm_git_facts_error_t *error) {
1958 size_t worst_header = work->facts->identity.oid_hex_length + 7 + gf_batch_digits(SIZE_MAX);

Callers 2

gf_batch_preflightFunction · 0.85
gf_batch_read_payloadsFunction · 0.85

Calls 2

gf_run_inputFunction · 0.85
gf_batch_captureFunction · 0.85

Tested by

no test coverage detected