diff options
author | Tom Willemse | 2014-03-01 21:03:48 +0100 |
---|---|---|
committer | Tom Willemse | 2014-03-01 21:18:39 +0100 |
commit | aacc242fb3707ac5ff2b01d345a9ac709243d624 (patch) | |
tree | 6880659bc3d64f4867653ca12a2d7dfd81b14a6b | |
parent | 9df3b848e01661db574137348eb86e867eeaede5 (diff) | |
download | gitto-aacc242fb3707ac5ff2b01d345a9ac709243d624.tar.gz gitto-aacc242fb3707ac5ff2b01d345a9ac709243d624.zip |
Extract print-config
-rw-r--r-- | gitto/main.scm | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gitto/main.scm b/gitto/main.scm index f4efeae..5b288de 100644 --- a/gitto/main.scm +++ b/gitto/main.scm @@ -46,6 +46,14 @@ (for-each print-repository-location (sort repositories repository-location<?))) +(define (print-config repo) + "Print the configuration for REPO." + (display (string-upcase (repo-name repo))) + (newline) + (write-config (read-config (repo-location repo))) + (newline) + (newline)) + (define (print-repository-location repo) "Print the location of REPO." (display (repo-location repo)) @@ -175,14 +183,7 @@ overwriting settings when necessary. The repositories in the only updates the configuration for that repository. *Note:* This is a destructive operation, you should be mindful." (cond - ((not sub) - (for-each (lambda (repo) - (display (string-upcase (repo-name repo))) - (newline) - (write-config (read-config (repo-location repo))) - (newline) - (newline)) - repositories)) + ((not sub) (for-each print-config repositories)) ((equal? sub "global") (show-global-config)) ((equal? sub "update") (update-config repository)))) |