When patching a crate with git, how to have cargo to pull the latest commit from that git branch?

e.g. I'm patching winapi-rs, I have a fork from winapi-rs based on 0.3.7, I have my own changes checked into my fork, and I have below patch in the toml

winapi = { git = "https://github.com/chandde/winapi-rs", branch = "prtest3"

I then ran cargo update -p winapi:0.3.7 --precise 0.3.7, which indeed updated winapi in the cargo.lock to my branch, however, it's pointing to an old commit, 8a45d4833896127539ee30077c36c07d40c03905, that was tagged as 0.3.7 in the upstream, how do I make cargo to take the most recent changes in my branch?

Seems I can use --precise to point to the exact commit when cargo patch, issue closed!

Based on testing-a-bugfix, you may need to specify

cargo update -p winapi --precise $version

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.