Skip to content

Conversation

@genshen
Copy link
Owner

@genshen genshen commented Sep 22, 2025

This bug is found when cloning gitee repo gitee.com/mirrors/yaml-cpp, then an error occurs: "some refs were not updated". By reviewing go-git source code, the error is from here: https://github.com/go-git/go-git/blob/v5.14.0/remote.go#L1263. We can fix the error by setting flag Force: true in git.FetchOptions when fetching repo refs.

…fetching refs in a git repo

This bug is found when cloning gitee repo `gitee.com/mirrors/yaml-cpp`, then an error occurs:
"some refs were not updated". By reviewing go-git source code, the error is from here:
https://github.com/go-git/go-git/blob/v5.14.0/remote.go#L1263. We can fix the error by setting flag
`Force: true` in git.FetchOptions when fetching repo refs.
@genshen genshen merged commit 7fdcc62 into master Sep 22, 2025
2 checks passed
@genshen genshen deleted the fix-git-fetch-ref-not-updated branch September 22, 2025 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants