diff options
author | Florian Apolloner <florian@apolloner.eu> | 2008-06-11 17:14:26 +0200 |
---|---|---|
committer | Florian Apolloner <florian@apolloner.eu> | 2008-06-11 17:14:26 +0200 |
commit | f347c6da5e83b137c337f9ccb190090c27cfc953 (patch) | |
tree | 793b9e11cc84072c1214cc3697cc27c482a39852 /lib/git/cmd.py | |
parent | 93ad8da5a8c6ddcbe67abae2cc4a7aad8084e736 (diff) | |
download | gitpython-f347c6da5e83b137c337f9ccb190090c27cfc953.tar.gz |
added support for GIT_PYTHON_TRACE=='full', thx to SRabbelier for the suggestion
Diffstat (limited to 'lib/git/cmd.py')
-rw-r--r-- | lib/git/cmd.py | 7 |
1 files changed, 5 insertions, 2 deletions
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) |