The `rad patch checkout` command would blindly create a branch when being executed. If there was a branch already existing and user had committed to that branch, switched without updating the patch, and then switched back, then they would lose the commit on that branch -- the original commit of the patch would be taken instead. Fix this by first checking if the branch existed beforehand, and setting the workspace to use that branch's commit. Add a test to ensure that this works as expected. Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett |
||
|---|---|---|
| .. | ||
| examples | ||
| src | ||
| tests | ||
| Cargo.toml | ||