From 1e2b46138ba58033738a24dadccc265748fce2ca Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 3 Jun 2010 23:20:34 +0200 Subject: commit.create_from_tree now uses pure python implementation, fixed message parsing which truncated newlines although it was ilegitimate. Its up to the reader to truncate therse, nowhere in the git code I could find anyone adding newlines to commits where it is written Added performance tests for serialization, it does about 5k commits per second if writing to tmpfs --- lib/git/cmd.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lib/git/cmd.py') diff --git a/lib/git/cmd.py b/lib/git/cmd.py index aaa27adc..18d1c505 100644 --- a/lib/git/cmd.py +++ b/lib/git/cmd.py @@ -323,12 +323,7 @@ class Git(object): stdout_value = proc.stdout.read().rstrip() # strip trailing "\n" else: max_chunk_size = 1024*64 - while True: - chunk = proc.stdout.read(max_chunk_size) - output_stream.write(chunk) - if len(chunk) < max_chunk_size: - break - # END reading output stream + stream_copy(proc.stdout, output_stream, max_chunk_size) stdout_value = output_stream # END stdout handling stderr_value = proc.stderr.read().rstrip() # strip trailing "\n" -- cgit v1.2.1