mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-23 01:22:12 +03:00
remove target extraction from vbranch, use origin
This commit is contained in:
parent
958979c623
commit
f9bc13685a
@ -1483,14 +1483,6 @@ pub fn push(
|
|||||||
let current_session_reader = sessions::Reader::open(gb_repository, ¤t_session)
|
let current_session_reader = sessions::Reader::open(gb_repository, ¤t_session)
|
||||||
.context("failed to open current session")?;
|
.context("failed to open current session")?;
|
||||||
|
|
||||||
let target_reader = target::Reader::new(¤t_session_reader);
|
|
||||||
let default_target = match target_reader.read_default() {
|
|
||||||
Ok(target) => Ok(target),
|
|
||||||
Err(reader::Error::NotFound) => return Ok(()),
|
|
||||||
Err(e) => Err(e),
|
|
||||||
}
|
|
||||||
.context("failed to read default target")?;
|
|
||||||
|
|
||||||
let branch_reader = branch::Reader::new(¤t_session_reader);
|
let branch_reader = branch::Reader::new(¤t_session_reader);
|
||||||
let branch_writer = branch::Writer::new(gb_repository);
|
let branch_writer = branch::Writer::new(gb_repository);
|
||||||
|
|
||||||
@ -1506,7 +1498,7 @@ pub fn push(
|
|||||||
|
|
||||||
let output = Command::new("git")
|
let output = Command::new("git")
|
||||||
.arg("push")
|
.arg("push")
|
||||||
.arg(default_target.remote)
|
.arg("origin")
|
||||||
.arg(format!("{}:{}", vbranch.head, upstream))
|
.arg(format!("{}:{}", vbranch.head, upstream))
|
||||||
.current_dir(project_path)
|
.current_dir(project_path)
|
||||||
.output()
|
.output()
|
||||||
|
Loading…
Reference in New Issue
Block a user