Bug Description
go-git is unable the open a repository with negative fetch spec due to strict validation, resulting in failed to open repository: read config: malformed refspec, separators are wrong
To fix this we need to:
Relates to entireio/cli#778.
Upstream information on negative refspec: https://git-scm.com/docs/git-fetch/2.31.0#Documentation/git-fetch.txt-refspec.
go-git Version
v6@main
Steps to Reproduce
The repository config:
[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
Additional Information
No response
Bug Description
go-gitis unable the open a repository with negative fetch spec due to strict validation, resulting infailed to open repository: read config: malformed refspec, separators are wrongTo fix this we need to:
Relates to entireio/cli#778.
Upstream information on negative refspec: https://git-scm.com/docs/git-fetch/2.31.0#Documentation/git-fetch.txt-refspec.
go-git Version
v6@main
Steps to Reproduce
The repository config:
Additional Information
No response