Skip to content

Commit

Permalink
Merge pull request #188 from nmorey/dev/git_url_change
Browse files Browse the repository at this point in the history
git: Support url change
  • Loading branch information
aspiers authored Aug 31, 2017
2 parents d82222e + 5e6a849 commit 0abf73a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions TarSCM/scm/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ def fetch_submodules(self):

def update_cache(self):
"""Update sources via git."""
# Force origin to the wanted URL in case it switched
self.helpers.safe_run(
['git', 'config', 'remote.origin.url', self.url],
cwd=self.clone_dir,
interactive=sys.stdout.isatty()
)

self.helpers.safe_run(
['git', 'fetch', '--tags'],
cwd=self.clone_dir,
Expand Down

0 comments on commit 0abf73a

Please sign in to comment.