From f347c6da5e83b137c337f9ccb190090c27cfc953 Mon Sep 17 00:00:00 2001 From: Florian Apolloner Date: Wed, 11 Jun 2008 17:14:26 +0200 Subject: added support for GIT_PYTHON_TRACE=='full', thx to SRabbelier for the suggestion --- lib/git/cmd.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/git/cmd.py') diff --git a/lib/git/cmd.py b/lib/git/cmd.py index afa13e2c..cf0f066d 100644 --- a/lib/git/cmd.py +++ b/lib/git/cmd.py @@ -84,8 +84,8 @@ class Git(MethodMissingMixin): tuple(int(status), str(output)) # with_status = True """ - if GIT_PYTHON_TRACE: - print command + if GIT_PYTHON_TRACE and not GIT_PYTHON_TRACE == 'full': + print ' '.join(command) # Allow stderr to be merged into stdout when with_stderr is True. # Otherwise, throw stderr away. @@ -117,6 +117,9 @@ class Git(MethodMissingMixin): raise GitCommandError("%s returned exit status %d" % (str(command), status)) + if GIT_PYTHON_TRACE == 'full': + print "%s %d: '%s'" % (command, status, stdout_value) + # Allow access to the command's status code if with_status: return (status, stdout_value) -- cgit v1.2.1