Commit cfd06aaa authored by Michal Čihař's avatar Michal Čihař

Use git config instead of git remote set-branches

This allows us to work with older Git versions.

Closes #399
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 704af819
......@@ -439,14 +439,11 @@ class GitRepository(Repository):
self.execute(['remote', 'set-url', 'origin', '--push', push_url])
# Set branch to track
try:
self.execute(
['remote', 'set-branches', 'origin', branch]
)
except RepositoryException:
self.execute(
['remote', 'set-branches', '--add', 'origin', branch]
)
self.execute([
'config',
'remote.origin.fetch',
'+refs/heads/{0}:refs/remotes/origin/{0}'.format(branch)
])
def configure_branch(self, branch):
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment