Skip to content

Commit 4d9bded

Browse files
committed
fix!: rename Prepare::with_shell_allow_argument_splitting() to Prepare::with_shell_allow_manual_argument_splitting()
1 parent 26c274d commit 4d9bded

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

gix-command/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ mod prepare {
131131
/// Use a shell, but try to split arguments by hand if this can be safely done without a shell.
132132
///
133133
/// If that's not the case, use a shell instead.
134-
pub fn with_shell_allow_argument_splitting(mut self) -> Self {
134+
pub fn with_shell_allow_manual_argument_splitting(mut self) -> Self {
135135
self.allow_manual_arg_splitting = true;
136136
self.with_shell()
137137
}

gix-command/tests/command.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ mod prepare {
246246
#[test]
247247
fn multiple_arguments_in_one_line_with_auto_split() {
248248
let cmd = std::process::Command::from(
249-
gix_command::prepare("echo first second third").with_shell_allow_argument_splitting(),
249+
gix_command::prepare("echo first second third").with_shell_allow_manual_argument_splitting(),
250250
);
251251
assert_eq!(
252252
format!("{cmd:?}"),
@@ -313,8 +313,9 @@ mod prepare {
313313

314314
#[test]
315315
fn single_and_complex_arguments_with_auto_split() {
316-
let cmd =
317-
std::process::Command::from(gix_command::prepare("ls --foo=\"a b\"").with_shell_allow_argument_splitting());
316+
let cmd = std::process::Command::from(
317+
gix_command::prepare("ls --foo=\"a b\"").with_shell_allow_manual_argument_splitting(),
318+
);
318319
assert_eq!(
319320
format!("{cmd:?}"),
320321
format!(r#""ls" "--foo=a b""#),
@@ -332,8 +333,9 @@ mod prepare {
332333

333334
#[test]
334335
fn single_and_complex_arguments_will_not_auto_split_on_special_characters() {
335-
let cmd =
336-
std::process::Command::from(gix_command::prepare("ls --foo=~/path").with_shell_allow_argument_splitting());
336+
let cmd = std::process::Command::from(
337+
gix_command::prepare("ls --foo=~/path").with_shell_allow_manual_argument_splitting(),
338+
);
337339
assert_eq!(
338340
format!("{cmd:?}"),
339341
format!(r#""{SH}" "-c" "ls --foo=~/path" "--""#),

0 commit comments

Comments
 (0)