added command structure for git calling
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user