git command structure now in place
This commit is contained in:
@@ -136,13 +136,19 @@
|
||||
|
||||
(define-syntax git-error
|
||||
(syntax-rules ()
|
||||
((_ cmd msg* out)
|
||||
(let ((msg (format "git ~a: ~a: ~a" cmd msg* (string-join
|
||||
(map (λ (e) (format "~a" e))
|
||||
(if (list? out)
|
||||
out
|
||||
(list out)))
|
||||
"\n"))))
|
||||
((_ cmd msg* outp)
|
||||
(let* ((out (map (λ (e) (if (list? e)
|
||||
(if (null? e)
|
||||
""
|
||||
(if (or (eq? (car e) 'stdout)
|
||||
(eq? (car e) 'stderr))
|
||||
(format "~a" (cadr e))
|
||||
(format "~a" e)))
|
||||
(format "~a" e)))
|
||||
(if (list? outp) outp (list outp))))
|
||||
(enter (if (eq? (system-type 'os) 'windows) "\r\n" "\n"))
|
||||
(msg (format "git ~a: ~a: ~a" cmd msg* (string-join out enter)))
|
||||
)
|
||||
(err-git msg)
|
||||
(error 'git msg))
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user