Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb38020a

Browse files
author
Sverre Rabbelier
committed
Improved the GIT_PYTHON_TRACE=full output format
It now also shows stderr if there was any on it, and onlyshows stdout if there was any output. Also added a '->'between the command and the return value as a visual clue.
1 parent9b63b3b commitb38020a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

‎lib/git/cmd.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ def execute(self, command,
107107
status=proc.wait()
108108
proc.stdout.close()
109109

110+
ifproc.stderr:
111+
stderr_value=proc.stderr.read()
112+
proc.stderr.close()
113+
110114
# Strip off trailing whitespace by default
111115
ifnotwith_raw_output:
112116
stdout_value=stdout_value.rstrip()
@@ -118,7 +122,12 @@ def execute(self, command,
118122
% (str(command),status))
119123

120124
ifGIT_PYTHON_TRACE=='full':
121-
print"%s %d: '%s'"% (command,status,stdout_value)
125+
ifstderr_value:
126+
print"%s -> %d: '%s' !! '%s'"% (command,status,stdout_value,stderr_value)
127+
elifstdout_value:
128+
print"%s -> %d: '%s'"% (command,status,stdout_value)
129+
else:
130+
print"%s -> %d"% (command,status)
122131

123132
# Allow access to the command's status code
124133
ifwith_status:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp