git-update: Use --autosquash during pull --rebase

This option has existed forever and allows people to automatically
update and autosquash/pop changes in subproject git repositories.
This commit is contained in:
Nirbheek Chauhan 2016-11-08 23:25:26 +05:30
parent 07424d2fdf
commit 6707b41d08

View file

@ -46,7 +46,7 @@ def update_repo(repo_name, repo_dir, revision, no_interaction, recurse_i=0):
git("fetch", repository_path=repo_dir) git("fetch", repository_path=repo_dir)
git("checkout", revision, repository_path=repo_dir) git("checkout", revision, repository_path=repo_dir)
else: else:
git("pull", "--rebase", repository_path=repo_dir) git("pull", "--rebase", "--autostash", repository_path=repo_dir)
except Exception as e: except Exception as e:
out = getattr(e, "output", b"").decode() out = getattr(e, "output", b"").decode()
if not no_interaction: if not no_interaction: