From 84c4a5e510fb014684f4b668a22c8eaa5cd51606 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Wed, 29 Oct 2014 16:04:46 +0000 Subject: Don't say 'Updating git repository xxx' unless we actually are This fixes an issue where various branch-and-merge commands appeared to be updating Git repos even when --no-git-update was specified. The flag was actually honoured but the message made it seem as if it was being ignored. --- morphlib/localrepocache.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/morphlib/localrepocache.py b/morphlib/localrepocache.py index a7f0692b..002022b9 100644 --- a/morphlib/localrepocache.py +++ b/morphlib/localrepocache.py @@ -227,9 +227,10 @@ class LocalRepoCache(object): def get_updated_repo(self, reponame): # pragma: no cover '''Return object representing cached repository, which is updated.''' - self._app.status(msg='Updating git repository %s in cache' % reponame) if not self._app.settings['no-git-update']: cached_repo = self.cache_repo(reponame) + self._app.status( + msg='Updating git repository %s in cache' % reponame) cached_repo.update() else: cached_repo = self.get_repo(reponame) -- cgit v1.2.1