Skip to content

Commit 5c7b9e2

Browse files
committed
fix(flow): start fullrepo tree from empty tree, not HEAD
Previously build_fullrepo_tree() started from HEAD's tree, then removed the agent paths that pass is_agent_path(). Any main-tracked file that does NOT pass is_agent_path() (e.g. .gemini/ SYSTEM config that is now tracked on main after the AGENT_ONLY removal) would leak straight through into the published fullrepo, duplicating content that already lives on the adapter's main branch. Start the temp index from the well-known empty tree (4b825dc) so the resulting fullrepo commit contains exactly the current agent-only paths from the worktree and nothing else. Refs: rldyour-antigravity-cli .gemini/ SYSTEM config tracked on main
1 parent 47e0002 commit 5c7b9e2

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

plugins/rldyour-flow/scripts/fullrepo_sync.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,10 @@ def build_fullrepo_tree(root: Path) -> tuple[str, list[str]]:
331331
with tempfile.NamedTemporaryFile(prefix="rldyour-fullrepo-index.") as tmp_index:
332332
env = os.environ.copy()
333333
env["GIT_INDEX_FILE"] = tmp_index.name
334-
_git("read-tree", "HEAD", env=env)
335-
336-
head_agent_paths = tracked_agent_paths("HEAD")
337-
if head_agent_paths:
338-
_git("rm", "--cached", "-q", "--ignore-unmatch", "--", *head_agent_paths, env=env)
334+
# Start from the well-known empty tree so non-agent main content
335+
# (e.g. .gemini/ files that are now tracked on main) does not leak
336+
# into the fullrepo commit.
337+
_git("read-tree", "4b825dc642cb6eb9a060e54bf8d69288fbee4904", env=env)
339338

340339
if agent_paths:
341340
_git("add", "-f", "--", *agent_paths, env=env)

0 commit comments

Comments
 (0)