From 55617ccff21f6261109882c85b9bfbe9c154275e Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 3 Dec 2010 19:59:15 +0100 Subject: tekuti git uses get-bytevector-all * tekuti/git.scm (run): Use get-bytevector-all instead of read-delimited. --- tekuti/git.scm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tekuti/git.scm b/tekuti/git.scm index 7c946b3..b505345 100644 --- a/tekuti/git.scm +++ b/tekuti/git.scm @@ -30,6 +30,8 @@ #:use-module (tekuti util) #:use-module (tekuti config) #:use-module (tekuti match-bind) + #:use-module (rnrs bytevectors) + #:use-module (rnrs io ports) #:use-module ((srfi srfi-1) #:select (filter-map partition delete-duplicates)) #:use-module (srfi srfi-34) @@ -84,10 +86,15 @@ args)) (let* ((real-args (trc (redirect-input (prepend-env args)))) (pipe (apply open-pipe* OPEN_READ real-args)) - (output (read-delimited "" pipe)) + (output (begin + (set-port-encoding! pipe "ISO-8859-1") + (let ((bv (get-bytevector-all pipe))) + (if (eof-object? bv) + "" + (utf8->string bv))))) (ret (close-pipe pipe))) (case (status:exit-val ret) - ((0) (if (eof-object? output) "" output)) + ((0) output) (else (trc 'git-error output ret real-args) (raise (condition (&git-condition (argv real-args) -- cgit v1.2.3-54-g00ecf