From 645b58f08eb90f8f8126ad7c2e1475b230b8811e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Tue, 5 Dec 2017 15:02:08 -0500 Subject: [PATCH] Git extend scope to all branch --- check_update.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/check_update.py b/check_update.py index 56557de2d..efc3e432a 100644 --- a/check_update.py +++ b/check_update.py @@ -8,9 +8,11 @@ repository_path = pygit2.discover_repository(current_working_directory) local_repo = pygit2.Repository(repository_path) def check_and_apply_update(repo=local_repo, remote_name='origin'): - repo.config['user.name'] = 'Bazarr user' + repo.config['remote.origin.fetch'] = '+refs/heads/*:refs/remotes/origin/*' + repo.remote.update() + repo.config['user.name'] = 'Bazarr user' repo.config['user.email'] ='bazarr@fakeuser.com' - + for remote in repo.remotes: if remote.name == remote_name: remote.fetch()