added command structure for git calling

This commit is contained in:
2026-08-12 14:58:47 +02:00
parent 5ee7145ac7
commit 7be7007285
3 changed files with 44 additions and 18 deletions
+13 -4
View File
@@ -3,6 +3,7 @@
(require "private/git-provider.rkt"
"private/git-commands.rkt"
"private/config.rkt"
simple-log
)
(provide git)
@@ -15,12 +16,20 @@
(cond
([eq? command 'status] (cmd-git-status args))
([eq? command 'add] (cmd-git-add args))
([eq? command 'commit] (cmd-git-commit args))
(else (error "Not supported git command '~a" command))
)
)
(define (git-status . args)
(cmd-git-status args))
(define-syntax def-cmd
(syntax-rules ()
((_ cmd cmd*)
(define (cmd . args)
(cmd* args)))))
(def-cmd git-status cmd-git-status)
(def-cmd git-add cmd-git-add)
(def-cmd git-commit cmd-git-commit)
(define (git-add . args)
(cmd-git-add args))