ohmyzsh: git clone fails with transfer.fsckobjects = true: zeroPaddedFilemode
Running Git 2.7.4:
% 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
Workaround: use the tarball/zip archive…
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (11 by maintainers)
Commits related to this issue
- Set default git-config values known to fix repository issues - core.autocrlf=false -> #4069 - fsck.zeroPaddedFilemode -> #4963 Fixes #4069 Fixes #4963 — committed to mcornella/ohmyzsh by mcornella 5 years ago
- Set default git-config values known to fix repository issues - core.autocrlf=false -> #4069 - fsck.zeroPaddedFilemode -> #4963 Fixes #4069 Fixes #4963 — committed to spiliopoulos/zsh-config by mcornella 5 years ago
- Set default git-config values known to fix repository issues - core.autocrlf=false -> #4069 - fsck.zeroPaddedFilemode -> #4963 Fixes #4069 Fixes #4963 — committed to lparam/oh-my-zsh by mcornella 5 years ago
- Set default git-config values known to fix repository issues - core.autocrlf=false -> #4069 - fsck.zeroPaddedFilemode -> #4963 Fixes #4069 Fixes #4963 — committed to uthng/oh-my-zsh by mcornella 5 years ago
- Set default git-config values known to fix repository issues - core.autocrlf=false -> #4069 - fsck.zeroPaddedFilemode -> #4963 Fixes #4069 Fixes #4963 — committed to crdant/oh-my-zsh-custom by mcornella 5 years ago
- Set default git-config values known to fix repository issues - core.autocrlf=false -> #4069 - fsck.zeroPaddedFilemode -> #4963 Fixes #4069 Fixes #4963 — committed to tekniklr/oh-my-zsh by mcornella 5 years ago
I’ve found the official documentation for that
fsck.zeroPaddedFilemodesetting, it’s at git-config (look forfsck.<msg-id>).Now, I’ve seen this setting works when doing a
git fsckmanually: the error message doesn’t appear again. But it still happens with thefsckobjects = truesetting, so I have the suspicion that there’s a bug here.Investigating further…
@johnramsden:
I have been using this in my scripts (see for example install_ohmyzsh.sh#L70):
It does not clone the whole repo history, just the latest version, which should be ok anyway for automated installs. (I am quite sure I did not come up with this myself, but I am unable to retrace it to the original source).
Alternatively there is the command suggested in this StackOverflow answer, pointed out above by @kevinburke:
Ok, so it seems there’s a bug on git’s behavior when fetching: https://github.com/holman/dotfiles/issues/231#issuecomment-210259671.
I can’t do anything else but recommend you to override those
*.fsckobjectssettings (set them to false), in just the OMZ repository at least.There’s no other solution to that annoying error that doesn’t involve everybody’s OMZ setups catching fire.
FWIW, if you want to work around this and leave your global git config alone, you can follow these instructions: http://stackoverflow.com/q/41029654/329700
I don’t know the internals but this may hit other users, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813157 for the discussion where Debian is considering making this the default. So unfortunately this could become a wider problem.
The
fsck.zeroPaddedFilemode = ignoresetting didn’t work for me withtransfer.fsckobjectsset to true, sorry. Git 2.7.4.man gitsays that the generalfsck.msg-idsetting is supported for this kind of use case but I can’t find any online cites of the specific solution you suggested so maybe the message ID is wrong? Or 2.7.4 is broken in some way? How did you verify your solution, and with what Git version?