Skip to content

Clarify Git.execute and Popen arguments #1688

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Oct 3, 2023
Prev Previous commit
Next Next commit
Don't say Git.execute uses a shell, in its summary
The top line of the Git.execute docstring said that it used a
shell, which is not necessarily the case (and is not usually the
case, since the default is not to use one). This removes that
claim while keeping the top-line wording otherwise the same.

It also rephrases the description of the command parameter, in a
way that does not change its meaning but reflects the more common
practice of passing a sequence of arguments (since portable calls
that do not use a shell must do that).
  • Loading branch information
EliahKagan committed Oct 3, 2023
commit 13e1593fc6a3c218451e29dd6b4a58b3a44afee3
6 changes: 3 additions & 3 deletions git/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,12 +842,12 @@ def execute(
strip_newline_in_stdout: bool = True,
**subprocess_kwargs: Any,
) -> Union[str, bytes, Tuple[int, Union[str, bytes], str], AutoInterrupt]:
"""Handles executing the command on the shell and consumes and returns
the returned information (stdout)
"""Handles executing the command and consumes and returns the returned
information (stdout)

:param command:
The command argument list to execute.
It should be a string, or a sequence of program arguments. The
It should be a sequence of program arguments, or a string. The
program to execute is the first item in the args sequence or string.

:param istream:
Expand Down