summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Git.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Git.py b/src/lib/Bcfg2/Server/Plugins/Git.py
index e46c331b3..759146059 100644
--- a/src/lib/Bcfg2/Server/Plugins/Git.py
+++ b/src/lib/Bcfg2/Server/Plugins/Git.py
@@ -70,6 +70,13 @@ class Git(Bcfg2.Server.Plugin.Version):
self.logger.warning("Git: Failed to perform garbage collection: %s"
% sys.exc_info()[1])
+ self.debug_log("Git: Fetching all refs for repo at %s" % self.vcs_root)
+ try:
+ self._log_git_cmd(self.repo.git.fetch('--all'))
+ except git.GitCommandError:
+ self.logger.warning("Git: Failed to fetch refs: %s" %
+ sys.exc_info()[1])
+
if ref:
self.debug_log("Git: Checking out %s" % ref)
try: