From 4379761764bdbeb38e2d28ec514384957248bb6d Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Fri, 18 Jan 2019 14:32:00 +0000 Subject: _gitsourcebase.py: Fetch with explicit refspecs Old versions of git lack --force and --tags, but the same effect can be had by specifying refspecs. --- buildstream/_gitsourcebase.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildstream/_gitsourcebase.py b/buildstream/_gitsourcebase.py index 4ee870d99..1d33bd539 100644 --- a/buildstream/_gitsourcebase.py +++ b/buildstream/_gitsourcebase.py @@ -112,7 +112,8 @@ class GitMirror(SourceFetcher): else: remote_name = "origin" - self.source.call([self.source.host_git, 'fetch', remote_name, '--prune', '--force', '--tags'], + self.source.call([self.source.host_git, 'fetch', remote_name, '--prune', + '+refs/heads/*:refs/heads/*', '+refs/tags/*:refs/tags/*'], fail="Failed to fetch from remote git repository: {}".format(url), fail_temporarily=True, cwd=self.mirror) -- cgit v1.2.1