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-21 10:41:37 +0000 |
commit | 4379761764bdbeb38e2d28ec514384957248bb6d (patch) | |
tree | 0d1b860efca9e6654f92390f578766c22ab06846 | |
parent | e230dedba3b5daac6d1d1f006bff792c10b9cf60 (diff) | |
download | buildstream-4379761764bdbeb38e2d28ec514384957248bb6d.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) |