git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: gitattributesLarge: .gitattributes too large to parse

From
DSDanny Smit <danny.smit.0@gmail.com>
Date
Mar 1, 2023, 09:13 UTC
Message-ID
<CACoz=-zOhoe=gQ_0Jr=rbdBvh=tQhLQ=Hfmb4Z=ZePpsaWcTHw@mail.gmail.com>
In-Reply-To
<Y/5yj8uAEM3Pz7T7@coredump.intra.peff.net>
On Tue, Feb 28, 2023 at 10:30 PM Jeff King <peff@peff.net> wrote:
Show 5 quoted lines
>
> On Tue, Feb 28, 2023 at 02:15:20PM -0500, Taylor Blau wrote:
> > You can suppress this message with:
> >
> >    $ git config fsck.gitattributesLarge ignore
Thanks, that is useful to know.
Show 5 quoted lines
> >
> > It's interesting that you can cause `fsck` to produce an error in the
> > bare repository but not in the non-bare one. Do you have
> > `fsck.gitattributesLarge` set to anything in the non-bare repository?
> > Are the affected objects in the `fsck.skipList`?

The configuration in the non-bare repository is almost clean, except for the remotes and branch, it only contains the following:

$ git config -l --local core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true

and:

$ git config -l color.ui=true core.autocrlf=input core.bare=false core.filemode=true core.logallrefupdates=true core.repositoryformatversion=0 fsck.gitattributeslarge=ignore pull.rebase=true push.autosetupremote=true status.showuntrackedfiles=normal

So there is nothing in `fsck.skipList`.
Show 20 quoted lines
> > Looking at 27ab4784d5, the comment there says:
> >
> >     if (!buf || size > ATTR_MAX_FILE_SIZE) {
> >       /*
> >        * A missing buffer here is a sign that the caller found the
> >        * blob too gigantic to load into memory. Let's just consider
> >        * that an error.
> >        */
> >       return report(options, oid, OBJ_BLOB,
> >                     FSCK_MSG_GITATTRIBUTES_LARGE,
> >                     ".gitattributes too large to parse");
> >     }
> >
> > ...so it's possible that the caller indeed found the blob too large to
> > load into memory, which would cause us to emit the ".gitattributes too
> > large to parse" fsck error without a .gitattributes file that actually
> > exceeds 100 MiB in size.
>
> I think that "!buf" case would also trigger if the size exceeded
> core.bigFileThreshold. It might be worth checking for that, too.
As shown above `core.bigFileThreshold` unset is in the local git configuration.

However, I just found the following configuration in the `config` file in the bare repository, where the `core.bigFileThreshold` is defined with a value of 1m. That seems likely to be the cause:

    [core]
            repositoryformatversion = 0
            filemode = true
            bare = true
            bigFileThreshold = 1m
            logallrefupdates = true
            autocrlf = false
            eol = lf
            symlinks = true
    [gc]
            autodetach = false
            auto = 0
After changing the value here, the error is gone.

Thanks for your help! Danny

Previous: Jeff King
Message 4 of 4 in “gitattributesLarge: .gitattributes too large to parse”
  1. Danny SmitFeb 28, 2023
  2. Taylor BlauFeb 28, 2023
  3. Jeff KingFeb 28, 2023
  4. Danny SmitMar 1, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.