diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-10-22 14:13:17 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-10-22 14:13:17 +0200 |
commit | c53eeaca19163b2b5484304a9ecce3ef92164d70 (patch) | |
tree | 15d8057f08df63ea76fc92a3a3d0e1062b46c1e5 /lib/git/cmd.py | |
parent | 25945899a0067a2dbeeae7a8362a6d68bbc5c6ba (diff) | |
download | gitpython-c53eeaca19163b2b5484304a9ecce3ef92164d70.tar.gz |
git cmd fix: After removing the with_raw_output flag, I actually did the wrong thing by _not_ stripping the final newline at the end of all git commands we use. This is the default now which cannot be changed - perhaps its wrong to remove it, but in way you'd always want the final newline stripped unless you get data directly, but there are better ways to do that ( blob.data, blob.data_stream, blob.stream_data )
Diffstat (limited to 'lib/git/cmd.py')
-rw-r--r-- | lib/git/cmd.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/git/cmd.py b/lib/git/cmd.py index 88d6008a..d674224c 100644 --- a/lib/git/cmd.py +++ b/lib/git/cmd.py @@ -190,7 +190,7 @@ class Git(object): status = 0 try: if output_stream is None: - stdout_value = proc.stdout.read() + stdout_value = proc.stdout.read().rstrip() # strip trailing "\n" else: max_chunk_size = 1024*64 while True: @@ -201,7 +201,7 @@ class Git(object): # END reading output stream stdout_value = output_stream # END stdout handling - stderr_value = proc.stderr.read() + stderr_value = proc.stderr.read().rstrip() # strip trailing "\n" # waiting here should do nothing as we have finished stream reading status = proc.wait() finally: |