Skip to content

Commit 10d7207

Browse files
committed
feat(git): add worktree branch roots
1 parent 2003821 commit 10d7207

8 files changed

Lines changed: 717 additions & 3 deletions

File tree

Makefile.cbm

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

218+
# Git context module (new)
219+
GIT_SRCS = src/git/git_context.c
220+
218221
# CLI module (new)
219222
CLI_SRCS = src/cli/cli.c src/cli/progress_sink.c src/cli/hook_augment.c
220223

@@ -257,7 +260,7 @@ TRE_CFLAGS = -std=c11 -g -O1 -w -Ivendored/tre
257260
YYJSON_SRC = vendored/yyjson/yyjson.c
258261

259262
# All production sources
260-
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)
263+
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)
261264
EXISTING_C_SRCS = $(EXTRACTION_SRCS) $(LSP_SRCS) $(TS_RUNTIME_SRC) \
262265
$(GRAMMAR_SRCS) $(AC_LZ4_SRCS) $(ZSTD_SRCS) $(SQLITE_WRITER_SRC)
263266

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)