You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This revises the `gix_command::Prepare` documentation, mainly for
clarity but also to add some information and cover or explain some
cases that were not (or not as fully) covered before.
This builds on recent documentation changes, such as those in #1800.
Less importantly, this also:
- Wraps `Prepare` documentation comments to a more consistent
width, when doing so improved unrendered readability.
- Made a trace message more precise, to avoid obscuring a subtlety
about the distinction between what we are looking for and what we
are adding, since that might occasionally relate to the reason
someone is examining trace messages.
/// Unconditionally turn off using the shell when spawning the command.
141
-
/// Note that not using the shell is the default so an effective use of this method
142
-
/// is some time after [`command_may_be_shell_script()`](Prepare::command_may_be_shell_script()) was called.
172
+
///
173
+
/// Note that not using the shell is the default. So an effective use of this method
174
+
/// is some time after [`command_may_be_shell_script()`](Self::command_may_be_shell_script())
175
+
/// or [`with_shell()`](Self::with_shell()) was called.
143
176
pubfnwithout_shell(mutself) -> Self{
144
177
self.use_shell = false;
145
178
self
146
179
}
147
180
148
181
/// Set additional `ctx` to be used when spawning the process.
149
182
///
150
-
/// Note that this is a must for most kind of commands that `git` usually spawns,
151
-
/// as at least they need to know the correct `git` repository to function.
183
+
/// Note that this is a must for most kind of commands that `git` usually spawns, as at
184
+
/// least they need to know the correct Git repository to function.
152
185
pubfnwith_context(mutself,ctx:Context) -> Self{
153
186
self.context = Some(ctx);
154
187
self
155
188
}
156
189
157
-
/// Like [`command_may_be_shell_script()`](Prepare::command_may_be_shell_script()), but try to split arguments by hand if this can be safely done without a shell.
190
+
/// Like [`command_may_be_shell_script()`](Self::command_may_be_shell_script()), but try to
191
+
/// split arguments by hand if this can be safely done without a shell.
192
+
///
193
+
/// This is useful on platforms where spawning processes is slow, or where many processes
194
+
/// have to be spawned in a row which should be sped up. Manual argument splitting is
195
+
/// enabled by default on Windows only.
158
196
///
159
-
/// This is useful on platforms where spawning processes is slow, or where many processes have to be spawned in a raw which should be sped up.
160
-
/// Manual argument splitting is enabled by default on Windows only.
197
+
/// Note that this does *not* check for the use of possible shell builtins. Commands may
198
+
/// fail or behave differently if they are available as shell builtins and no corresponding
199
+
/// external command exists, or the external command behaves differently.
/// Like [`command_may_be_shell_script()`](Prepare::command_may_be_shell_script()), but don't allow to bypass the shell even if manual argument splitting
167
-
/// can be performed safely.
205
+
/// Like [`command_may_be_shell_script()`](Self::command_may_be_shell_script()), but don't
206
+
/// allow to bypass the shell even if manual argument splitting can be performed safely.
0 commit comments