git command structure now in place

This commit is contained in:
2026-08-12 15:50:53 +02:00
parent 5773450329
commit 90a2b1758d
3 changed files with 109 additions and 71 deletions
+13 -7
View File
@@ -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))
)