git_deploy: use "git pull --rebase" when repo debug is enabled

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2021-07-27 05:52:56 -04:00
parent 42f61ceafa
commit 86e0ef0d5e
1 changed files with 4 additions and 1 deletions

View File

@ -468,8 +468,11 @@ class GitRepo:
raise self.server.error(
f"Git Repo {self.alias}: Cannot perform pull on a "
"detached HEAD")
cmd = "pull --progress"
if self.cmd_helper.is_debug_enabled():
cmd = "pull --progress --rebase"
async with self.git_operation_lock:
await self._run_git_cmd_async("pull --progress")
await self._run_git_cmd_async(cmd)
async def list_branches(self) -> List[str]:
self._verify_repo()