Make --pull work like the other commands

main
Vadim vtroshchinskiy 2024-12-16 13:10:10 +01:00
parent 51a8fb66db
commit 1575934568
1 changed files with 7 additions and 2 deletions

View File

@ -1534,16 +1534,21 @@ class OpengnsysGitLibrary:
if origin: if origin:
self.logger.debug("Fetching from origin") self.logger.debug("Fetching from origin")
origin.fetch() origin.fetch(progress=OgProgressPrinter(self.logger))
else: else:
self.logger.error("Origin not found, can't fetch") self.logger.error("Origin not found, can't fetch")
def pullRepo(self, path): def pull(self, path = None, device = None):
""" """
Pull changes from ogrepository Pull changes from ogrepository
This unconditionally overwrites remote changes. There is no conflict resolution. This unconditionally overwrites remote changes. There is no conflict resolution.
""" """
if path is None:
path = self.fs.ensure_mounted(device)
repo = git.Repo(path) repo = git.Repo(path)
self.logger.debug("Downloading from ogrepository") self.logger.debug("Downloading from ogrepository")