aboutsummaryrefslogtreecommitdiffstats
path: root/gitto/git.scm
diff options
context:
space:
mode:
authorGravatar Tom Willemse2014-03-01 20:40:06 +0100
committerGravatar Tom Willemse2014-03-01 21:18:39 +0100
commit9df3b848e01661db574137348eb86e867eeaede5 (patch)
tree582fef0e7c59cd6c065f30923014cc0a45e3c7ae /gitto/git.scm
parent95125d682cb70efbbbd41646b8ebe1f0518fa1f5 (diff)
downloadgitto-9df3b848e01661db574137348eb86e867eeaede5.tar.gz
gitto-9df3b848e01661db574137348eb86e867eeaede5.zip
Simplify save-repositories-list
Simplify `save-repositories-list' by extracting some of the functionality into its own procedures. Since there is now a `repository-name<?' procedure the `repository<?' procedure is renamed to `repository-location<?' for clarity and accuracy, since that is what it really checks.
Diffstat (limited to 'gitto/git.scm')
-rw-r--r--gitto/git.scm11
1 files changed, 8 insertions, 3 deletions
diff --git a/gitto/git.scm b/gitto/git.scm
index a0cec3a..c7b2cdf 100644
--- a/gitto/git.scm
+++ b/gitto/git.scm
@@ -37,7 +37,8 @@
repo-location
repo-name
repository?
- repository<?
+ repository-location<?
+ repository-name<?
same-repository?))
(define show-unchanged-branches? #f)
@@ -60,10 +61,14 @@
(define (repository? repo)
(is-a? repo <repository>))
-(define (repository<? repo1 repo2)
- "Compary REPO1 and REPO2 to see if REPO1 should be considered smaller."
+(define (repository-location<? repo1 repo2)
+ "Compary REPO1 and REPO2 to see if REPO1 should be considered less."
(string<? (repo-location repo1) (repo-location repo2)))
+(define (repository-name<? repo1 repo2)
+ "Compare REPO1 and REPO2 to see if REPO1 should be considered less."
+ (string<? (repo-name repo1) (repo-name repo2)))
+
(define-method (branch-pullable (branch <branch>))
(force (slot-ref branch 'pullable)))