From c53eeaca19163b2b5484304a9ecce3ef92164d70 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 22 Oct 2009 14:13:17 +0200 Subject: 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 ) --- lib/git/cmd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/git/cmd.py') 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: -- cgit v1.2.1