From 49e6dd1e0fc65de7f259f21d2f63c56e5b165a48 Mon Sep 17 00:00:00 2001 From: weichen Date: Tue, 29 Sep 2026 13:30:11 +0000 Subject: [PATCH] Ignore CodeGraph indexes from the repository root as well. A second ignore layer keeps the SQLite database local even if codegraph init overwrites the nested policy file. Co-authored-by: Cursor --- .codegraph/.gitignore | 12 ++++++++++-- .gitignore | 4 ++++ README.md | 4 ++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.codegraph/.gitignore b/.codegraph/.gitignore index d20c0fe..5d41e6a 100644 --- a/.codegraph/.gitignore +++ b/.codegraph/.gitignore @@ -1,5 +1,13 @@ # CodeGraph data files — local to each machine, not for committing. -# Ignore everything in .codegraph/ except this file itself, so transient -# files (the database, daemon.pid, sockets, logs) never show up in git. +# Ignore everything in .codegraph/ except this file itself. Known transients: +# SQLite database and WAL/SHM, daemon.pid, sockets, and logs. The catch-all +# covers anything codegraph init adds later. +codegraph.db +codegraph.db-wal +codegraph.db-shm +codegraph.db-journal +daemon.pid +*.sock +*.log * !.gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..36f0f04 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +# CodeGraph local index. A second layer so the database stays untracked even +# if .codegraph/.gitignore is overwritten by codegraph init. +.codegraph/* +!.codegraph/.gitignore diff --git a/README.md b/README.md index c5a184d..627b415 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,10 @@ - 重试单一责任层:步骤级归调用方,传输级有界归 adapter,turn 上限归 runtime。 - Workspace 路径授权 ≠ OS 沙箱。 +## CodeGraph + +`codegraph init` 的索引写在 `.codegraph/`。仓库只跟踪 `.codegraph/.gitignore`。SQLite 数据库、WAL、pid、socket 和日志留在本机;根目录 `.gitignore` 与该文件双重忽略,避免索引被提交。 + ## 开发 在仓库根目录: