I have the following settings in my global Git configuration:
[transfer]
fsckobjects = true
[fetch]
fsckobjects = true
[receive]
fsckobjects = true
These verify that all objects in the cloned database are valid and reachable.
However, some repos I want to check out have errors, like 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 I can override my global fsckobjects settings for a single "git clone" operation?
Use git clone --config key=value
and pass all of the arguments you want to skip there. For oh-my-zsh
, that looks like this:
git clone --config transfer.fsckobjects=false \
--config receive.fsckobjects=false \
--config fetch.fsckobjects=false \
git://github.com/robbyrussell/oh-my-zsh.git