diff options
author | Tom Willemsen | 2012-09-18 08:47:35 +0200 |
---|---|---|
committer | Tom Willemsen | 2012-09-18 08:47:35 +0200 |
commit | d47e68fe21a22d631e95db5c53b6647dc0139f86 (patch) | |
tree | 8547c5d087a01918fd0f7ef9df4b922a86073327 | |
parent | 2f0fd8d03e032ae21922fe34f68f3f4846045f8c (diff) | |
download | gitto-d47e68fe21a22d631e95db5c53b6647dc0139f86.tar.gz gitto-d47e68fe21a22d631e95db5c53b6647dc0139f86.zip |
Don't fail when a repository can't be found
Report it instead.
-rw-r--r-- | gitto/main.scm | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/gitto/main.scm b/gitto/main.scm index 789c49e..ea977d8 100644 --- a/gitto/main.scm +++ b/gitto/main.scm @@ -145,14 +145,18 @@ to the tracked files. Utracked files will not register." "List information about every repository." (for-each (lambda (repo) - (chdir repo) - (let ((numup (git-revs-to-push)) - (numdown (git-revs-to-pull)) - (clean? (git-clean?)) - (lastupdate (git-last-update))) - (format #t - "~a:~15t~d to push, ~d to pull and is ~adirty. Last update: ~a\n" - (basename repo) numup numdown (if clean? "not " "") lastupdate))) + (if (file-exists? repo) + (begin + (chdir repo) + (let ((numup (git-revs-to-push)) + (numdown (git-revs-to-pull)) + (clean? (git-clean?)) + (lastupdate (git-last-update))) + (format + #t "~a:~15t~d to push, ~d to pull and is ~adirty. Last update: ~a\n" + (basename repo) numup numdown (if clean? "not " "") + lastupdate))) + (format #t "~a:~15tnot found at ~s\n" (basename repo) repo))) repositories)) (define (list-repository-locations) |