What happened?
When running hunk diff --watch, the status polling creates git locks that trip up coding agents that try to rebase or pull from a remote.
Took a quick look and the fix is likely here:
|
/** Build the porcelain status query used to discover untracked files for working-tree review. */ |
|
function buildGitStatusArgs(input: VcsCommandInput) { |
|
const args = ["status", "--porcelain=v1", "-z", "--untracked-files=all"]; |
|
|
|
appendGitPathspecs(args, input.pathspecs); |
|
return args; |
|
} |
Most likely should be changed to:
/** Build the porcelain status query used to discover untracked files for working-tree review. */
function buildGitStatusArgs(input: VcsCommandInput) {
const args = ["--no-optional-locks", "status", "--porcelain=v1", "-z", "--untracked-files=all"];
appendGitPathspecs(args, input.pathspecs);
return args;
}
From my understanding, this is what Zed does.
Steps to reproduce
- run
hunk diff --watch
- run
git rebase origin/main (not sure if it happens every time, but I often see it and the agent has to work around it by physically deleting git lockfiles)
Expected behavior
No locking
Version
0.14.1
What happened?
When running
hunk diff --watch, the status polling creates git locks that trip up coding agents that try to rebase or pull from a remote.Took a quick look and the fix is likely here:
hunk/src/core/git.ts
Lines 144 to 150 in 59cc857
Most likely should be changed to:
From my understanding, this is what Zed does.
Steps to reproduce
hunk diff --watchgit rebase origin/main(not sure if it happens every time, but I often see it and the agent has to work around it by physically deleting git lockfiles)Expected behavior
No locking
Version
0.14.1