git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Bug/feature request: Can’t disable fsck warnings during clone
@ 2017-12-28 15:51 Kevin A. Mitchell
  2018-01-04 20:28 ` Johannes Schindelin
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin A. Mitchell @ 2017-12-28 15:51 UTC (permalink / raw)
  To: git

Hi!

I’ve set transfer.fsckObjects to true globally, for safety.
Unfortunately, this messed up my Spacevim install.

Doing some digging, I found that some of the repos had a warning. I
can turn the warning off, but that only affects git fsck, not git
clone. Turning off transfer.fsckObjects also fixes the problem. I’d
rather have it on for my development work.

Tested with the “next” branch as well.

$ git -c transfer.fsckObjects=true -c fsck.zeroPaddedFilemode=ignore
clone https://github.com/albfan/ag.vim
Cloning into 'ag.vim'...
remote: Counting objects: 1879, done.
error: object 65e1a0027644b6625b32d30ba5ccf1c4d483480a:
zeroPaddedFilemode: contains zero-padded file modes
fatal: Error in object
fatal: index-pack failed
$ git —version
git version 2.15.1.501.g29533fb16

but this works as expected:

$ git clone https://github.com/albfan/ag.vim
Cloning into 'ag.vim'...
remote: Counting objects: 1879, done.
remote: Total 1879 (delta 0), reused 0 (delta 0), pack-reused 1879
Receiving objects: 100% (1879/1879), 1.23 MiB | 2.76 MiB/s, done.
Resolving deltas: 100% (938/938), done.
$ cd ag.vim
$ git -c transfer.fsckObjects=true -c fsck.zeroPaddedFilemode=ignore fsck
Checking object directories: 100% (256/256), done.
Checking objects: 100% (1879/1879), done.
$ git -c transfer.fsckObjects=true fsck
Checking object directories: 100% (256/256), done.
warning in tree 65e1a0027644b6625b32d30ba5ccf1c4d483480a:
zeroPaddedFilemode: contains zero-padded file modes
Checking objects: 100% (1879/1879), done.

It would be useful to be able to turn off individual warnings during
cloning. Is there something I’m missing in the config? Or, is this
something that could be fixed?

Thanks,

Kevin

-- 
Kevin A. Mitchell
http://www.kamit.com/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug/feature request: Can’t disable fsck warnings during clone
  2017-12-28 15:51 Bug/feature request: Can’t disable fsck warnings during clone Kevin A. Mitchell
@ 2018-01-04 20:28 ` Johannes Schindelin
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Schindelin @ 2018-01-04 20:28 UTC (permalink / raw)
  To: Kevin A. Mitchell; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 2653 bytes --]

Hi Kevin,

On Thu, 28 Dec 2017, Kevin A. Mitchell wrote:

> I’ve set transfer.fsckObjects to true globally, for safety.
> Unfortunately, this messed up my Spacevim install.
> 
> Doing some digging, I found that some of the repos had a warning. I
> can turn the warning off, but that only affects git fsck, not git
> clone. Turning off transfer.fsckObjects also fixes the problem. I’d
> rather have it on for my development work.
> 
> Tested with the “next” branch as well.
> 
> $ git -c transfer.fsckObjects=true -c fsck.zeroPaddedFilemode=ignore
> clone https://github.com/albfan/ag.vim
> Cloning into 'ag.vim'...
> remote: Counting objects: 1879, done.
> error: object 65e1a0027644b6625b32d30ba5ccf1c4d483480a:
> zeroPaddedFilemode: contains zero-padded file modes
> fatal: Error in object
> fatal: index-pack failed
> $ git —version
> git version 2.15.1.501.g29533fb16
> 
> but this works as expected:
> 
> $ git clone https://github.com/albfan/ag.vim
> Cloning into 'ag.vim'...
> remote: Counting objects: 1879, done.
> remote: Total 1879 (delta 0), reused 0 (delta 0), pack-reused 1879
> Receiving objects: 100% (1879/1879), 1.23 MiB | 2.76 MiB/s, done.
> Resolving deltas: 100% (938/938), done.
> $ cd ag.vim
> $ git -c transfer.fsckObjects=true -c fsck.zeroPaddedFilemode=ignore fsck
> Checking object directories: 100% (256/256), done.
> Checking objects: 100% (1879/1879), done.
> $ git -c transfer.fsckObjects=true fsck
> Checking object directories: 100% (256/256), done.
> warning in tree 65e1a0027644b6625b32d30ba5ccf1c4d483480a:
> zeroPaddedFilemode: contains zero-padded file modes
> Checking objects: 100% (1879/1879), done.
> 
> It would be useful to be able to turn off individual warnings during
> cloning. Is there something I’m missing in the config? Or, is this
> something that could be fixed?

Well, you can apparently have your cake and eat it too (see
https://git-scm.com/docs/git-config#git-config-receivefsckltmsg-idgt):

receive.fsck.<msg-id>::
        When `receive.fsckObjects` is set to true, errors can be switched
        to warnings and vice versa by configuring the `receive.fsck.<msg-id>`
        setting where the `<msg-id>` is the fsck message ID and the value
        is one of `error`, `warn` or `ignore`. For convenience, fsck prefixes
        the error/warning with the message ID, e.g. "missingEmail: invalid
        author/committer line - missing email" means that setting
        `receive.fsck.missingEmail = ignore` will hide that issue.

In your case, use receive.fsck.zeroPaddedFilemode=ignore=warn (or
=ignore).

Ciao,
Johannes

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-04 20:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-28 15:51 Bug/feature request: Can’t disable fsck warnings during clone Kevin A. Mitchell
2018-01-04 20:28 ` Johannes Schindelin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).