Skip to content

Commit

Permalink
zoekt-mirror-gerrit: fix fetch for meta/config (#777)
Browse files Browse the repository at this point in the history
The current configuration creates a conflict with default
fetch config `+refs/heads/*:refs/heads/*`.

The first fetch is ok but once a local "refs/heads/meta/config" exists
fetch fails because 2 fetch rules match for local "refs/heads/meta/config" :
"refs/meta/config" and "refs/heads/meta/config"

Changing local ref name fixes the problem
  • Loading branch information
xavier-calland authored May 6, 2024
1 parent 7c5b778 commit 9f35cb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/zoekt-mirror-gerrit/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ func addMetaConfigFetch(repoDir string) error {

rm := cfg.Remotes["origin"]
if rm != nil {
configRefSpec := config.RefSpec("+refs/meta/config:refs/heads/meta/config")
configRefSpec := config.RefSpec("+refs/meta/config:refs/heads/meta-config")
if !slices.Contains(rm.Fetch, configRefSpec) {
rm.Fetch = append(rm.Fetch, configRefSpec)
}
Expand Down

0 comments on commit 9f35cb1

Please sign in to comment.