git-update: Use git config to set autostash
authorNirbheek Chauhan <nirbheek@centricular.com>
Wed, 9 Nov 2016 19:40:58 +0000 (01:10 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Wed, 9 Nov 2016 19:40:58 +0000 (01:10 +0530)
The build bots don't like it; probably because the git version is
ancient there. Bots should ignore the unknown config variable.

git-update

index d86810e..32a085a 100755 (executable)
@@ -42,12 +42,13 @@ def update_subprojects(manifest, no_interaction=False):
 
 def update_repo(repo_name, repo_dir, revision, no_interaction, recurse_i=0):
     print("Updating %s..." % repo_name)
+    git("config", "rebase.autoStash", "true", repository_path=repo_dir)
     try:
         if revision:
             git("fetch", repository_path=repo_dir)
             git("checkout", revision, repository_path=repo_dir)
         else:
-            git("pull", "--rebase", "--autostash", repository_path=repo_dir)
+            git("pull", "--rebase", repository_path=repo_dir)
     except Exception as e:
         out = getattr(e, "output", b"").decode()
         if not no_interaction: