diff options
-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) |