You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see a similar issue was addressed in #6795 so this is possibly a regression, or perhaps it didn't address the issue when branch is specified.
I am using branch target on my repositories in cargo.toml, when I have to rebase and force push a feature branch, any crates using that feature branch won't update. The first call of cargo update shows updating <git repo>... but doesn't actually do it.
Inspection of the cargo.lock shows the old commit ref is still being used.
Removing the cargo.lock on its own does nothing, but coupled with deleting the repo folder in the cargo/git/db and checkouts folder before cargo update works around the problem.
Steps
Setup a lib crate, create a feature branch.
Add crate into main project using: crate_name = { git = "repo_url.git", branch = "feature_branch" }
Edit/amend the last commit on the feature branch so the commit ref changes
Force push
Attempt to cargo update on main project
Note the files in checkouts have not updated
Possible Solution(s)
No response
Notes
I did note that when deleting the repo folder in DB and checkouts without deleting the cargo.lock, a reasonable error is displayed advising it can't find the commit ref. Then deleting the cargo.lock would rectify the issue.
Problem
I see a similar issue was addressed in #6795 so this is possibly a regression, or perhaps it didn't address the issue when branch is specified.
I am using branch target on my repositories in
cargo.toml
, when I have to rebase and force push a feature branch, any crates using that feature branch won't update. The first call ofcargo update
showsupdating <git repo>...
but doesn't actually do it.Inspection of the
cargo.lock
shows the old commit ref is still being used.Removing the
cargo.lock
on its own does nothing, but coupled with deleting the repo folder in thecargo/git/db
andcheckouts
folder before cargo update works around the problem.Steps
Setup a lib crate, create a feature branch.
Add crate into main project using:
crate_name = { git = "repo_url.git", branch = "feature_branch" }
Edit/amend the last commit on the feature branch so the commit ref changes
Force push
Attempt to
cargo update
on main projectNote the files in
checkouts
have not updatedPossible Solution(s)
No response
Notes
I did note that when deleting the repo folder in DB and checkouts without deleting the
cargo.lock
, a reasonable error is displayed advising it can't find the commit ref. Then deleting thecargo.lock
would rectify the issue.Version
The text was updated successfully, but these errors were encountered: