From 0c4c84ca5cc79eb910ddcd0d4b95112d72df5d93 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Tue, 2 Jul 2019 18:05:42 -0400 Subject: [PATCH 1/2] Protect from an infinite loop --- magithub-core.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/magithub-core.el b/magithub-core.el index b07c2d9..80556a9 100644 --- a/magithub-core.el +++ b/magithub-core.el @@ -504,7 +504,8 @@ of the form `owner/name' (as in `vermiculus/magithub')." (ghubp-get-repos-owner-repo ',sparse-repo)) (and (not (magithub--api-available-p)) sparse-repo))) - (when (magithub-online-p) + (when (and (magithub-online-p) + (not magithub-cache--refresh)) (let ((magithub-cache--refresh t)) (magithub-repo sparse-repo))) sparse-repo)))) From e824ad5a0c9831bfed16618573050e740b5a2990 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Tue, 2 Jul 2019 23:11:26 -0400 Subject: [PATCH 2/2] Update with requested changes --- magithub-core.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/magithub-core.el b/magithub-core.el index 80556a9..dbc7852 100644 --- a/magithub-core.el +++ b/magithub-core.el @@ -504,8 +504,8 @@ of the form `owner/name' (as in `vermiculus/magithub')." (ghubp-get-repos-owner-repo ',sparse-repo)) (and (not (magithub--api-available-p)) sparse-repo))) - (when (and (magithub-online-p) - (not magithub-cache--refresh)) + (when (and (not magithub-cache--refresh) + (magithub-online-p)) (let ((magithub-cache--refresh t)) (magithub-repo sparse-repo))) sparse-repo))))