-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Library update fails with git provider and fixed sync-version #721
Comments
The fix is indeed simple: diff --git a/fusesoc/provider/git.py b/fusesoc/provider/git.py
index cbcf3a1..bb1af4b 100644
--- a/fusesoc/provider/git.py
+++ b/fusesoc/provider/git.py
@@ -38,7 +38,8 @@ class Git(Provider):
@staticmethod
def update_library(library):
- git_args = ["-C", library.location, "pull"]
+ download_option = "pull" if not library.sync_version else "fetch"
+ git_args = ["-C", library.location, download_option]
try:
Git._checkout_library_version(library)
Launcher("git", git_args).run() I need to add a test for it. After that, I'll submit a pull request. |
jfrimmel
added a commit
to jfrimmel/fusesoc
that referenced
this issue
Jan 18, 2025
See olofk#721 for context. This simply uses `git fetch` instead of `git pull` if a specific version is requested. This is a kind of hacky solution, since this won't work if somebody removes the `sync-version` from the `fusesoc.conf`-file (in that case, the code will use `git pull` again, which will fail as before). Since this usecase is not that common, this commit should be enough for now.
jfrimmel
added a commit
to jfrimmel/fusesoc
that referenced
this issue
Jan 18, 2025
See olofk#721 for context. This simply uses `git fetch` instead of `git pull` if a specific version is requested. This is a kind of hacky solution, since this won't work if somebody removes the `sync-version` from the `fusesoc.conf`-file (in that case, the code will use `git pull` again, which will fail as before). Since this usecase is not that common, this commit should be enough for now.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've noticed a problem when using fixed library versions in conjunction with libraries, that should be updated. This can reproduced with the current
master
(commitb604f53d
):I think this can be solved rather easily, by replacing
git pull
withgit fetch
when a sync-version is requested. I might open a PR for this soon.The text was updated successfully, but these errors were encountered: