-
Notifications
You must be signed in to change notification settings - Fork 279
entire CLI commands break in the presence of negative refspecs in git #778
Description
What happened?
Basically, this error after any command (including enable, doctor, etc.):
Error: metadata check failed: failed to open repository: failed to open repository: failed to open repository: read config: malformed refspec, separators are wrong
According to Claude Code:
The problem is the negative refspec entries in your git config. These lines under [remote "origin"]:
[redacted]
Negative refspecs (the ^ prefix) were added in Git 2.29, but most third-party Git libraries (like go-git, which Entire.io almost certainly uses) don't support them. The "malformed refspec, separators are wrong" error is the classic go-git complaint when it encounters this syntax.
My git is set up this way to avoid fetching some specific references that end up ballooning fetches, so ideally this is fixed to simply support syntax that the current version of git supports.
Steps to reproduce
- Set up a
.git/configfile similar to this example:
[core]
repositoryformatversion = 1
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = git@github.com:example/example.git
promisor = true
partialclonefilter = blob:none
fetch = +refs/heads/*:refs/remotes/origin/*
fetch = ^refs/heads/some-excluded-branch # <== The offending negation pattern!
fetch = ^refs/heads/another-excluded-branch # <== (again)
[branch "main"]
remote = origin
merge = refs/heads/main- Try to do just about any
entirecommand (so far, the only on I've seen not fail isentire disable).
Entire CLI version
Entire CLI 0.5.1 (d46fdc2)
OS and architecture
OS/Arch: darwin/arm64
Agent
N/A
Terminal
iTerm2, cmux
Logs / debug output
Additional context
No response