`entire` CLI commands break in the presence of negative refspecs in `git`
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.1k
- Forks
- 475
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 178
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 (d46fdc24)
OS and architecture
OS/Arch: darwin/arm64
Agent
N/A
Terminal
iTerm2, cmux
Logs / debug output
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the provided .git/config and trace the repository-opening path that reports “malformed refspec, separators are wrong.” Add regression coverage for negative fetch refspecs and verify that the affected Entire commands, including enable and doctor, no longer fail while disable remains unaffected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100