bccfe1389c97379388a148b3a48a63d7272ec017

Author
Mauricio Wolff <mauricio.wolff+gh@gmail.com>
Committer
GitHub <noreply@github.com>
Date

Message

updater: add --autostash to git pull (#7172)

If I have custom configs (like theme customizations) I have to stash my changes and get them back after the update. 

By adding the --autostash on upgrade.sh, if I have any changes not commited they'll be reapplied after the upgrade, allowing me to have temporary customizations without any harm to the upgrade process.

Diff

 1diff --git a/tools/upgrade.sh b/tools/upgrade.sh
 2index 3005e6542c95321eea9433ae3b60b598b4b78905..0dc84e2146efee24a3326d58f2f2ac1777a9fa66 100644
 3--- a/tools/upgrade.sh
 4+++ b/tools/upgrade.sh
 5@@ -38,7 +38,7 @@ if [ -n "$remote" ]; then
 6 fi
 7 
 8 printf "${BLUE}%s${NORMAL}\n" "Updating Oh My Zsh"
 9-if git pull --rebase --stat origin master
10+if git pull --rebase --autostash --stat origin master
11 then
12   printf '%s' "$GREEN"
13   printf '%s\n' '         __                                     __   '