mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-16 08:10:40 +08:00
cli: Use git push to open or update patches
This adds the ability to the git-remote-helper to open and update patches via a `git push` to the magic ref `refs/patches` and `refs/heads/patches/<patch-id>`. The main change is that we had to move away from offering the `connect` capability in the remote helper, to offering `push` and `fetch` individually. To get a feel for how this works, see the `rad-patch-via-push.md` example.
This commit is contained in:
@@ -60,11 +60,12 @@ pub fn run(
|
||||
let (target_ref, target_oid) = get_merge_target(storage, &head_branch)?;
|
||||
|
||||
if head_branch.upstream().is_err() {
|
||||
// TODO(cloudhead): Disable this when invoked from remote helper.
|
||||
radicle::git::set_upstream(
|
||||
workdir,
|
||||
&radicle::rad::REMOTE_NAME,
|
||||
&*radicle::rad::REMOTE_NAME,
|
||||
branch_name(&head_branch)?,
|
||||
&head_branch_name,
|
||||
head_branch_name,
|
||||
)?;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user