Skip to content

Commit a47aea3

Browse files
committed
feat: GitRepo.update_repo: set_remotes kwarg
1 parent 8c85f0c commit a47aea3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libvcs/git.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,14 +264,17 @@ def obtain(self):
264264

265265
self.set_remotes()
266266

267-
def update_repo(self):
267+
def update_repo(self, set_remotes: bool = False):
268268
self.ensure_dir()
269269

270270
if not os.path.isdir(os.path.join(self.path, ".git")):
271271
self.obtain()
272272
self.update_repo()
273273
return
274274

275+
if set_remotes:
276+
self.set_remotes(overwrite=True)
277+
275278
# Get requested revision or tag
276279
url, git_tag = self.url, getattr(self, "rev", None)
277280

0 commit comments

Comments
 (0)