534ec60bfd14ee640076c7594ee4fa723fafd1b1
- Author
- Marc Cornellà <marc.cornella@live.com>
- Committer
- Marc Cornellà <marc.cornella@live.com>
- Date
Message
Set default git-config values known to fix repository issues
- core.autocrlf=false -> #4069
- fsck.zeroPaddedFilemode -> #4963
Fixes #4069
Fixes #4963
Diff
1diff --git a/tools/install.sh b/tools/install.sh
2index 61010214ebfa3db7e6a1564a5370976f6e0b590a..a5a90e6f65e7365f7b918f7d80e9613698cc233e 100755
3--- a/tools/install.sh
4+++ b/tools/install.sh
5@@ -90,7 +90,11 @@ setup_ohmyzsh() {
6 exit 1
7 fi
8
9- git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$ZSH" || {
10+ git clone -c core.eol=lf -c core.autocrlf=false \
11+ -c fsck.zeroPaddedFilemode=ignore \
12+ -c fetch.fsck.zeroPaddedFilemode=ignore \
13+ -c receive.fsck.zeroPaddedFilemode=ignore \
14+ --depth=1 --branch "$BRANCH" "$REMOTE" "$ZSH" || {
15 error "git clone of oh-my-zsh repo failed"
16 exit 1
17 }
18diff --git a/tools/upgrade.sh b/tools/upgrade.sh
19index d234c7f8854ed43680be3bda4f93d70aa9413e74..0dd855b70884acd06d02c48a6c855d9e1e33bc5d 100644
20--- a/tools/upgrade.sh
21+++ b/tools/upgrade.sh
22@@ -20,8 +20,18 @@ else
23 NORMAL=""
24 fi
25
26-printf "${BLUE}%s${NORMAL}\n" "Updating Oh My Zsh"
27 cd "$ZSH"
28+
29+# Set git-config values known to fix git errors
30+# Line endings (#4069)
31+git config core.eol lf
32+git config core.autocrlf false
33+# zeroPaddedFilemode fsck errors (#4963)
34+git config fsck.zeroPaddedFilemode ignore
35+git config fetch.fsck.zeroPaddedFilemode ignore
36+git config receive.fsck.zeroPaddedFilemode ignore
37+
38+printf "${BLUE}%s${NORMAL}\n" "Updating Oh My Zsh"
39 if git pull --rebase --stat origin master
40 then
41 printf '%s' "$GREEN"