Skip to content

Commit

Permalink
Eliminate istream_ok variable
Browse files Browse the repository at this point in the history
In Git.execute, the stdin argument to Popen is the only one where a
compound expression (rather than a single term) is currently
passed. So having that be the same in the log message makes it
easier to understand what is going on, as well as to see how the
information shown in the log corresponds to what Popen receives.
  • Loading branch information
EliahKagan committed Oct 3, 2023
1 parent c3fde7f commit ab95886
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions git/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -973,16 +973,13 @@ def execute(
# end handle

stdout_sink = PIPE if with_stdout else getattr(subprocess, "DEVNULL", None) or open(os.devnull, "wb")
istream_ok = "None"
if istream:
istream_ok = "<valid stream>"
if shell is None:
shell = self.USE_SHELL
log.debug(
"Popen(%s, cwd=%s, stdin=%s, shell=%s, universal_newlines=%s)",
redacted_command,
cwd,
istream_ok,
"<valid stream>" if istream else "None",
shell,
universal_newlines,
)
Expand Down

0 comments on commit ab95886

Please sign in to comment.