Added add-porcelain
This commit is contained in:
@@ -31,6 +31,12 @@
|
||||
)
|
||||
)
|
||||
|
||||
(define (add-porcelain args . f)
|
||||
(if (has-git-arg? args '--porcelain)
|
||||
(if (null? f) args ((car f) args))
|
||||
(if (null? f) (cons '--porcelain args)
|
||||
((car f) (cons '--porcelain args)))))
|
||||
|
||||
(define-syntax def-cmd
|
||||
(syntax-rules ()
|
||||
((_ cmd cmd* cmd-sym)
|
||||
@@ -39,7 +45,9 @@
|
||||
(def-cmd cmd cmd* cmd-sym pre-code std-process-git-result))
|
||||
((_ cmd cmd* cmd-sym pre-code process-result)
|
||||
(begin
|
||||
(def-git-cmd-proxy cmd* cmd-sym pre-code process-result)
|
||||
(def-git-cmd-proxy cmd* cmd-sym
|
||||
pre-code
|
||||
process-result)
|
||||
(define (cmd . args) (cmd* args))
|
||||
(hash-set! git-commands cmd-sym cmd*)))
|
||||
)
|
||||
@@ -76,9 +84,6 @@
|
||||
(def-cmd git-commit cmd-git-commit 'commit
|
||||
(λ (args) (check-git-args 'commit args '((-m 1 "A commit message is mandatory"))))
|
||||
)
|
||||
(def-cmd git-push cmd-git-push 'push
|
||||
(λ (args) (if (has-git-arg? args '--porcelain)
|
||||
args
|
||||
(cons '--porcelain args)))
|
||||
)
|
||||
(def-cmd git-push cmd-git-push 'push add-porcelain)
|
||||
(def-cmd git-pull cmd-git-pull 'pull)
|
||||
(def-cmd git-branch cmd-git-branch 'branch)
|
||||
|
||||
Reference in New Issue
Block a user