From d47e68fe21a22d631e95db5c53b6647dc0139f86 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Tue, 18 Sep 2012 08:47:35 +0200 Subject: Don't fail when a repository can't be found Report it instead. --- gitto/main.scm | 20 ++++++++++++-------- 1 file 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) -- cgit v1.2.3-54-g00ecf