Minor style adjustments

This commit is contained in:
Tom Willemsen 2012-06-30 13:02:55 +02:00
parent 834855c0b3
commit 4379c6666d

View file

@ -55,8 +55,7 @@ gitto [options]
(define (register-repository repository)
(if (not (member repository repositories))
(begin
(set! repositories (append `(,repository)
repositories))
(set! repositories (append `(,repository) repositories))
(save-repositories-list)
(simple-format #t "Repository ~A registered." repository))
(display "Repository already registered."))
@ -72,21 +71,21 @@ gitto [options]
(newline))
(define (git-revs-to-push)
(let* ((response (open-input-pipe "git log --pretty=oneline @{u}.. | wc -l"))
(num (string->number (read-line response))))
(close-pipe response)
(let* ((pp (open-input-pipe "git log --pretty=oneline @{u}.. | wc -l"))
(num (string->number (read-line pp))))
(close-pipe pp)
num))
(define (git-revs-to-pull)
(let* ((response (open-input-pipe "git log --pretty=oneline ..@{u} | wc -l"))
(num (string->number (read-line response))))
(close-pipe response)
(let* ((pp (open-input-pipe "git log --pretty=oneline ..@{u} | wc -l"))
(num (string->number (read-line pp))))
(close-pipe pp)
num))
(define (git-clean?)
(let* ((response (open-input-pipe "git status -suno"))
(clean? (eof-object? (read-delimited "" response))))
(close-pipe response)
(let* ((pipe (open-input-pipe "git status -suno"))
(clean? (eof-object? (read-delimited "" pipe))))
(close-pipe pipe)
clean?))
(define (list-repositories)