forked from extern/ohmyzsh
fix(installer): avoid git clone -c
to support git v1.7.1 (#10621)
This commit is contained in:
parent
3741d1aa02
commit
59c40eee8e
@ -263,13 +263,19 @@ setup_ohmyzsh() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git clone -c core.eol=lf -c core.autocrlf=false \
|
# Manual clone with git config options to support git < v1.7.2
|
||||||
-c fsck.zeroPaddedFilemode=ignore \
|
git init "$ZSH" && cd "$ZSH" \
|
||||||
-c fetch.fsck.zeroPaddedFilemode=ignore \
|
&& git config core.eol lf \
|
||||||
-c receive.fsck.zeroPaddedFilemode=ignore \
|
&& git config core.autocrlf false \
|
||||||
-c oh-my-zsh.remote=origin \
|
&& git config fsck.zeroPaddedFilemode ignore \
|
||||||
-c oh-my-zsh.branch="$BRANCH" \
|
&& git config fetch.fsck.zeroPaddedFilemode ignore \
|
||||||
--depth=1 --branch "$BRANCH" "$REMOTE" "$ZSH" || {
|
&& git config receive.fsck.zeroPaddedFilemode ignore \
|
||||||
|
&& git config oh-my-zsh.remote origin \
|
||||||
|
&& git config oh-my-zsh.branch "$BRANCH" \
|
||||||
|
&& git remote add origin "$REMOTE" \
|
||||||
|
&& git fetch --depth=1 origin \
|
||||||
|
&& git checkout -b "$BRANCH" "origin/$BRANCH" || {
|
||||||
|
rm -rf "$ZSH"
|
||||||
fmt_error "git clone of oh-my-zsh repo failed"
|
fmt_error "git clone of oh-my-zsh repo failed"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user