Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
6ba2d9de
Commit
6ba2d9de
authored
Mar 11, 2020
by
Marc Cornellà
Browse files
updater: use `git config` instead of `git -c` for git < v1.7.2
Fixes #8732
parent
79003802
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/upgrade.sh
View file @
6ba2d9de
...
...
@@ -30,6 +30,9 @@ git config core.autocrlf false
git config fsck.zeroPaddedFilemode ignore
git config fetch.fsck.zeroPaddedFilemode ignore
git config receive.fsck.zeroPaddedFilemode ignore
# autostash on rebase (#7172)
resetAutoStash
=
$(
git config
--bool
rebase.autoStash 2>&1
)
git config rebase.autoStash
true
# Update upstream remote to ohmyzsh org
remote
=
$(
git remote
-v
|
awk
'/https:\/\/github\.com\/robbyrussell\/oh-my-zsh\.git/{ print $1; exit }'
)
...
...
@@ -38,7 +41,7 @@ if [ -n "$remote" ]; then
fi
printf
"
${
BLUE
}
%s
${
NORMAL
}
\n
"
"Updating Oh My Zsh"
if
git
-c
rebase.autoStash
=
true
pull
--rebase
--stat
origin master
if
git pull
--rebase
--stat
origin master
then
printf
'%s'
"
$GREEN
"
printf
'%s\n'
' __ __ '
...
...
@@ -53,3 +56,9 @@ then
else
printf
"
${
RED
}
%s
${
NORMAL
}
\n
"
'There was an error updating. Try again later?'
fi
# Unset git-config values set just for the upgrade
case
"
$resetAutoStash
"
in
""
)
git config
--unset
rebase.autoStash
;;
*
)
git config rebase.autoStash
"
$resetAutoStash
"
;;
esac
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment