From a9e2a1fe8df336472c80d66b3484e0eb7158ac9d Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Fri, 5 Jun 2015 19:04:18 -0400 Subject: [PATCH] Don't try to fetch remotes without configured refspecs. --- gitup/update.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gitup/update.py b/gitup/update.py index f0b8ae6..456f277 100644 --- a/gitup/update.py +++ b/gitup/update.py @@ -94,6 +94,12 @@ def _fetch_remotes(remotes): for remote in remotes: print(INDENT2, "Fetching", BOLD + remote.name, end="") + + config_attr = "remote.{0}.fetch".format(remote.name) + if not _read_config(remote.repo, config_attr): + print(":", YELLOW + "skipped:", "no configured refspec.") + continue + try: results = remote.fetch(progress=_ProgressMonitor()) except exc.GitCommandError as err: