History

refactor (#450)

Sebastian Thiel committed 4 years ago

Commit ce16f511 parent b66258f3 files · +8 −10Browse files

Showing the changes to git-credentials/src/program (1 of 3 files). Show all

Unified · Split

git-credentials/src/program/mod.rs+2−4
@@ -100,9 +100,7 @@ impl Helper for Program { · 99 unmodified lines
100 let mut cmd = match &kind {100 let mut cmd = match &kind {
101 Kind::Builtin => {101 Kind::Builtin => {
102 let mut cmd = Command::new(cfg!(windows).then(|| "git.exe").unwrap_or("git"));102 let mut cmd = Command::new(cfg!(windows).then(|| "git.exe").unwrap_or("git"));
103 cmd.arg("credential")103 cmd.arg("credential").stderr(Stdio::null()).arg(action.as_arg(false));
104 .stderr(Stdio::null())
105 .arg(action.as_helper_arg(false));
106 cmd104 cmd
107 }105 }
108 Kind::ExternalShellScript(for_shell)106 Kind::ExternalShellScript(for_shell)
@@ -113,7 +111,7 @@ impl Helper for Program { · 4 unmodified lines
113 path_and_args: for_shell,111 path_and_args: for_shell,
114 } => git_command::prepare(git_path::from_bstr(for_shell.as_bstr()).as_ref())112 } => git_command::prepare(git_path::from_bstr(for_shell.as_bstr()).as_ref())
115 .with_shell()113 .with_shell()
116 .arg(action.as_helper_arg(true))114 .arg(action.as_arg(true))
117 .into(),115 .into(),
118 };116 };
119 cmd.stdin(Stdio::piped()).stdout(if action.expects_output() {117 cmd.stdin(Stdio::piped()).stdout(if action.expects_output() {