aboutsummaryrefslogtreecommitdiffstats
path: root/gitto
diff options
context:
space:
mode:
Diffstat (limited to 'gitto')
-rw-r--r--gitto/git.scm5
-rw-r--r--gitto/main.scm5
2 files changed, 6 insertions, 4 deletions
diff --git a/gitto/git.scm b/gitto/git.scm
index c7b2cdf..3f760e2 100644
--- a/gitto/git.scm
+++ b/gitto/git.scm
@@ -38,6 +38,7 @@
repo-name
repository?
repository-location<?
+ repository-location-exists?
repository-name<?
same-repository?))
@@ -65,6 +66,10 @@
"Compary REPO1 and REPO2 to see if REPO1 should be considered less."
(string<? (repo-location repo1) (repo-location repo2)))
+(define (repository-location-exists? repo)
+ "Check to see if REPO's location exists."
+ (file-exists? (repo-location repo)))
+
(define (repository-name<? repo1 repo2)
"Compare REPO1 and REPO2 to see if REPO1 should be considered less."
(string<? (repo-name repo1) (repo-name repo2)))
diff --git a/gitto/main.scm b/gitto/main.scm
index 212f5dc..a46b5e2 100644
--- a/gitto/main.scm
+++ b/gitto/main.scm
@@ -228,10 +228,7 @@ registered repository as absolute paths."
Go through the list of registered repositories and remove all the ones
which no longer point to a git repository."
- (set! repositories
- (filter (lambda (repo)
- (file-exists? (repo-location repo)))
- repositories))
+ (set! repositories (filter repository-location-exists? repositories))
(save-repositories-list))
(define-command (remove repository)