Ignore fsck / zero-padded mode errors in "git clone"

I have the following settings in my global git configuration:

[transfer]
    fsckobjects = true

[fetch]
    fsckobjects = true

[receive]
    fsckobjects = true

They confirm that all objects in the cloned database are valid and reachable.

However, some repositions I want to check for have errors, for example oh-my-zsh:

git clone https://github.com/robbyrussell/oh-my-zsh.git .oh-my-zsh 
Cloning into '.oh-my-zsh'...
remote: Counting objects: 15624, done.
error: object 2b7227859263b6aabcc28355b0b994995b7148b6: zeroPaddedFilemode: contains zero-padded file modes
fatal: Error in object
fatal: index-pack failed

Is there a way to override my global fsckobjects options for a single git clone operation?

+4
source share
1 answer

Use git clone --config key=valueand pass in all the arguments you want to skip there. For oh-my-zshit is as follows:

git clone --config transfer.fsckobjects=false \
    --config receive.fsckobjects=false \
    --config fetch.fsckobjects=false \
    git://github.com/robbyrussell/oh-my-zsh.git
+5
source

Source: https://habr.com/ru/post/1663182/


All Articles