{"thread":{"id":"47504","subject":"Bug/feature request: Can’t disable fsck warnings during clone","startedAt":"2017-12-28T15:52:04Z","lastAt":"2018-01-04T20:28:29Z","messageCount":2,"participants":["Kevin A. Mitchell","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"335469","messageId":"CAF1p0HimkxVydxL3cfRXX0=oaBrmARzYqCbqiarWn1yvh+H-EA@mail.gmail.com","threadId":"47504","inReplyTo":null,"subject":"Bug/feature request: Can’t disable fsck warnings during clone","fromName":"Kevin A. Mitchell","fromEmail":"kam@kamit.com","sentAt":"2017-12-28T15:51:58Z","receivedAt":"2017-12-28T15:52:04Z","isPatch":false,"sender":{"key":"kam@kamit.com","avatar":null},"body":"Hi!\n\nI’ve set transfer.fsckObjects to true globally, for safety.\nUnfortunately, this messed up my Spacevim install.\n\nDoing some digging, I found that some of the repos had a warning. I\ncan turn the warning off, but that only affects git fsck, not git\nclone. Turning off transfer.fsckObjects also fixes the problem. I’d\nrather have it on for my development work.\n\nTested with the “next” branch as well.\n\n$ git -c transfer.fsckObjects=true -c fsck.zeroPaddedFilemode=ignore\nclone https://github.com/albfan/ag.vim\nCloning into 'ag.vim'...\nremote: Counting objects: 1879, done.\nerror: object 65e1a0027644b6625b32d30ba5ccf1c4d483480a:\nzeroPaddedFilemode: contains zero-padded file modes\nfatal: Error in object\nfatal: index-pack failed\n$ git —version\ngit version 2.15.1.501.g29533fb16\n\nbut this works as expected:\n\n$ git clone https://github.com/albfan/ag.vim\nCloning into 'ag.vim'...\nremote: Counting objects: 1879, done.\nremote: Total 1879 (delta 0), reused 0 (delta 0), pack-reused 1879\nReceiving objects: 100% (1879/1879), 1.23 MiB | 2.76 MiB/s, done.\nResolving deltas: 100% (938/938), done.\n$ cd ag.vim\n$ git -c transfer.fsckObjects=true -c fsck.zeroPaddedFilemode=ignore fsck\nChecking object directories: 100% (256/256), done.\nChecking objects: 100% (1879/1879), done.\n$ git -c transfer.fsckObjects=true fsck\nChecking object directories: 100% (256/256), done.\nwarning in tree 65e1a0027644b6625b32d30ba5ccf1c4d483480a:\nzeroPaddedFilemode: contains zero-padded file modes\nChecking objects: 100% (1879/1879), done.\n\nIt would be useful to be able to turn off individual warnings during\ncloning. Is there something I’m missing in the config? Or, is this\nsomething that could be fixed?\n\nThanks,\n\nKevin\n\n-- \nKevin A. Mitchell\nhttp://www.kamit.com/\n"},{"id":"335861","messageId":"alpine.DEB.2.21.1.1801042125430.32@MININT-6BKU6QN.europe.corp.microsoft.com","threadId":"47504","inReplyTo":"CAF1p0HimkxVydxL3cfRXX0=oaBrmARzYqCbqiarWn1yvh+H-EA@mail.gmail.com","subject":"Re: Bug/feature request: Can’t disable fsck warnings during clone","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-01-04T20:28:21Z","receivedAt":"2018-01-04T20:28:29Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Kevin,\n\nOn Thu, 28 Dec 2017, Kevin A. Mitchell wrote:\n\n> I’ve set transfer.fsckObjects to true globally, for safety.\n> Unfortunately, this messed up my Spacevim install.\n> \n> Doing some digging, I found that some of the repos had a warning. I\n> can turn the warning off, but that only affects git fsck, not git\n> clone. Turning off transfer.fsckObjects also fixes the problem. I’d\n> rather have it on for my development work.\n> \n> Tested with the “next” branch as well.\n> \n> $ git -c transfer.fsckObjects=true -c fsck.zeroPaddedFilemode=ignore\n> clone https://github.com/albfan/ag.vim\n> Cloning into 'ag.vim'...\n> remote: Counting objects: 1879, done.\n> error: object 65e1a0027644b6625b32d30ba5ccf1c4d483480a:\n> zeroPaddedFilemode: contains zero-padded file modes\n> fatal: Error in object\n> fatal: index-pack failed\n> $ git —version\n> git version 2.15.1.501.g29533fb16\n> \n> but this works as expected:\n> \n> $ git clone https://github.com/albfan/ag.vim\n> Cloning into 'ag.vim'...\n> remote: Counting objects: 1879, done.\n> remote: Total 1879 (delta 0), reused 0 (delta 0), pack-reused 1879\n> Receiving objects: 100% (1879/1879), 1.23 MiB | 2.76 MiB/s, done.\n> Resolving deltas: 100% (938/938), done.\n> $ cd ag.vim\n> $ git -c transfer.fsckObjects=true -c fsck.zeroPaddedFilemode=ignore fsck\n> Checking object directories: 100% (256/256), done.\n> Checking objects: 100% (1879/1879), done.\n> $ git -c transfer.fsckObjects=true fsck\n> Checking object directories: 100% (256/256), done.\n> warning in tree 65e1a0027644b6625b32d30ba5ccf1c4d483480a:\n> zeroPaddedFilemode: contains zero-padded file modes\n> Checking objects: 100% (1879/1879), done.\n> \n> It would be useful to be able to turn off individual warnings during\n> cloning. Is there something I’m missing in the config? Or, is this\n> something that could be fixed?\n\nWell, you can apparently have your cake and eat it too (see\nhttps://git-scm.com/docs/git-config#git-config-receivefsckltmsg-idgt):\n\nreceive.fsck.<msg-id>::\n        When `receive.fsckObjects` is set to true, errors can be switched\n        to warnings and vice versa by configuring the `receive.fsck.<msg-id>`\n        setting where the `<msg-id>` is the fsck message ID and the value\n        is one of `error`, `warn` or `ignore`. For convenience, fsck prefixes\n        the error/warning with the message ID, e.g. \"missingEmail: invalid\n        author/committer line - missing email\" means that setting\n        `receive.fsck.missingEmail = ignore` will hide that issue.\n\nIn your case, use receive.fsck.zeroPaddedFilemode=ignore=warn (or\n=ignore).\n\nCiao,\nJohannes"}]}