summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatar Andy Wingo2010-12-03 19:59:15 +0100
committerGravatar Andy Wingo2010-12-03 19:59:15 +0100
commit55617ccff21f6261109882c85b9bfbe9c154275e (patch)
tree6d746a4d8d442801a8998c1cbb436b3fc89a1693
parent5900823c3e168cea97b3b51d61c3fdc2130a921e (diff)
downloadtekuti-55617ccff21f6261109882c85b9bfbe9c154275e.tar.gz
tekuti-55617ccff21f6261109882c85b9bfbe9c154275e.zip
tekuti git uses get-bytevector-all
* tekuti/git.scm (run): Use get-bytevector-all instead of read-delimited.
-rw-r--r--tekuti/git.scm11
1 files 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)