From a3d1cc969fdbed3249f1a40ac156e0b8b1fe3ef7 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sun, 12 May 2013 15:03:00 +0200 Subject: [PATCH] Fix some bugs - The `register-repository' procedure was using a non-existent procedure `repository-name', this should be `repo-name'. - The `purge' procedure was working on a collection of `' objects, but assuming they were file names, the `repo-location' should first be extracted before calling `file-exists?'. --- gitto/main.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gitto/main.scm b/gitto/main.scm index 32e50d3..e65275a 100644 --- a/gitto/main.scm +++ b/gitto/main.scm @@ -169,7 +169,7 @@ gitto [options] (set! repositories (append `(,repository) repositories)) (save-repositories-list) (simple-format #t "Repository ~A registered." - (repository-name repository))) + (repo-name repository))) (display "Repository already registered.")) (newline)) @@ -250,7 +250,10 @@ to the tracked files. Utracked files will not register." (define (purge) "Purge all items from the list that can no longer be found." - (set! repositories (filter file-exists? repositories)) + (set! repositories + (filter (lambda (repo) + (file-exists? (repo-location repo))) + repositories)) (save-repositories-list)) (define option-spec