agentdiff icon indicating copy to clipboard operation
agentdiff copied to clipboard

feat: agentdiff init should register refs/agentdiff/* fetch refspec

Open codeprakhar25 opened this issue 6 months ago • 0 comments

What

agentdiff init should add a fetch refspec for refs/agentdiff/* to .git/config so that git fetch automatically brings down teammates' per-branch trace refs.

Why

Currently init only registers refs/notes/agentdiff (legacy). Devs who run git fetch before agentdiff push will never see teammates' local traces. The per-branch ref namespace is invisible to normal git operations without this refspec.

How

In init.rs, after installing hooks, add to .git/config:

[remote "origin"]
    fetch = +refs/agentdiff/*:refs/agentdiff/*

Or use: git config --add remote.origin.fetch +refs/agentdiff/*:refs/agentdiff/*

Check for duplicates before adding (idempotent).

Effort

~10 min. No dependencies.

codeprakhar25 avatar May 12 '26 12:05 codeprakhar25