mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-05 23:42:50 +00:00
git: enable sideband progress on subprocess push
The parsing function is adjusted in case stderr contained unparsed progress messages.
This commit is contained in:
parent
5396138ed5
commit
1faea485ca
@ -206,6 +206,9 @@ impl<'a> GitSubprocessContext<'a> {
|
|||||||
let mut command = self.create_command();
|
let mut command = self.create_command();
|
||||||
command.stdout(Stdio::piped());
|
command.stdout(Stdio::piped());
|
||||||
command.args(["push", "--porcelain"]);
|
command.args(["push", "--porcelain"]);
|
||||||
|
if callbacks.progress.is_some() {
|
||||||
|
command.arg("--progress");
|
||||||
|
}
|
||||||
command.args(
|
command.args(
|
||||||
references
|
references
|
||||||
.iter()
|
.iter()
|
||||||
@ -477,7 +480,8 @@ fn parse_git_push_output(output: Output) -> Result<(Vec<String>, Vec<String>), G
|
|||||||
|
|
||||||
if output
|
if output
|
||||||
.stderr
|
.stderr
|
||||||
.starts_with_str("error: failed to push some refs to ")
|
.lines()
|
||||||
|
.any(|line| line.starts_with(b"error: failed to push some refs to "))
|
||||||
{
|
{
|
||||||
parse_ref_pushes(&output.stdout)
|
parse_ref_pushes(&output.stdout)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user