mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-16 00:00:37 +08:00
cli: Make rad patch checkout idempotent
Fixes an error when you checkout an already checked out patch.
This commit is contained in:
@@ -26,7 +26,7 @@ pub fn run(
|
||||
let commit = find_patch_commit(&patch, &patch_branch, stored, working)?;
|
||||
|
||||
// Create patch branch and switch to it.
|
||||
working.branch(patch_branch.as_str(), &commit, false)?;
|
||||
working.branch(patch_branch.as_str(), &commit, true)?;
|
||||
working.checkout_tree(commit.as_object(), None)?;
|
||||
working.set_head(&git::refs::workdir::branch(&patch_branch))?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user