diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2019-01-18 14:32:00 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2019-01-18 14:47:12 +0000 |
commit | 4826357b1f3df04ca05f161891301a594db65247 (patch) | |
tree | 97ff9f1317fe99b5d27de4fb27e03d119c5093c2 | |
parent | ad2df651bc3fd0d3bfe915ed81a0b5df6a0e2ca2 (diff) | |
download | buildstream-4826357b1f3df04ca05f161891301a594db65247.tar.gz |
_gitsourcebase.py: Fetch with explicit refspecs
Old versions of git lack --force and --tags,
but the same effect can be had by specifying refspecs.
-rw-r--r-- | buildstream/_gitsourcebase.py | 3 |
1 files changed, 2 insertions, 1 deletions
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) |