Skip to content

Commit b8b7bfb

Browse files
committed
feat(git): add worktree branch roots
1 parent 359f37c commit b8b7bfb

8 files changed

Lines changed: 717 additions & 4 deletions

File tree

Makefile.cbm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ TRACES_SRCS = src/traces/traces.c
218218
# Watcher module (new)
219219
WATCHER_SRCS = src/watcher/watcher.c
220220

221+
# Git context module (new)
222+
GIT_SRCS = src/git/git_context.c
223+
221224
# CLI module (new)
222225
CLI_SRCS = src/cli/cli.c src/cli/progress_sink.c src/cli/hook_augment.c
223226

@@ -283,7 +286,7 @@ TRE_CFLAGS = -std=c11 -g -O1 -w -Ivendored/tre
283286
YYJSON_SRC = vendored/yyjson/yyjson.c
284287

285288
# All production sources
286-
PROD_SRCS = $(FOUNDATION_SRCS) $(STORE_SRCS) $(CYPHER_SRCS) $(MCP_SRCS) $(DISCOVER_SRCS) $(GRAPH_BUFFER_SRCS) $(PIPELINE_SRCS) $(SIMHASH_SRCS) $(SEMANTIC_SRCS) $(TRACES_SRCS) $(WATCHER_SRCS) $(CLI_SRCS) $(UI_SRCS) $(YYJSON_SRC)
289+
PROD_SRCS = $(FOUNDATION_SRCS) $(STORE_SRCS) $(CYPHER_SRCS) $(MCP_SRCS) $(DISCOVER_SRCS) $(GRAPH_BUFFER_SRCS) $(PIPELINE_SRCS) $(SIMHASH_SRCS) $(SEMANTIC_SRCS) $(TRACES_SRCS) $(WATCHER_SRCS) $(GIT_SRCS) $(CLI_SRCS) $(UI_SRCS) $(YYJSON_SRC)
287290
EXISTING_C_SRCS = $(EXTRACTION_SRCS) $(LSP_SRCS) $(TS_RUNTIME_SRC) \
288291
$(GRAMMAR_SRCS) $(AC_LZ4_SRCS) $(ZSTD_SRCS) $(SQLITE_WRITER_SRC)
289292

scripts/security-allowlist.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ src/watcher/watcher.c:cbm_popen:git working tree status (git_is_dirty)
2222
src/watcher/watcher.c:cbm_popen:git file count (git_file_count)
2323
src/watcher/watcher.c:popen:via cbm_popen wrapper calls
2424

25+
# ── Git context: git metadata resolution (repo paths validated via cbm_validate_shell_arg) ──
26+
src/git/git_context.c:cbm_popen:git rev-parse/symbolic-ref/merge-base metadata lookup
27+
src/git/git_context.c:popen:via cbm_popen wrapper call
28+
2529
# ── MCP server: search and change detection ────────────────────────────────
2630
src/mcp/mcp.c:cbm_popen:search_code via grep (pattern in temp file, path validated)
2731
src/mcp/mcp.c:cbm_popen:detect_changes via git diff (args validated)

0 commit comments

Comments
 (0)