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

Value size limits on git config files

From
JAJeff Adamson <jwa@urbancode.com>
Date
Apr 5, 2011, 16:29 UTC
Message-ID
<BANLkTikknAiYr4y-it3+qZ3dnXE56dQBoQ@mail.gmail.com>
When trying to incorporate large aliases into my ~/.gitconfig file via
`git config --global "!$(cat myscript)"`, I determined that there
appears to be a limit to the size of a value.  When exceeded, git
prints out "fatal: bad config file line 82 in ~/.gitconfig".  I was
able to strip enough comments and such from myscript that it then no
longer invalidated the config once the value was less than 1024 chars.
 (Minor aside, I am doing this as a small experiment to potentially
aid in synchronizing all my git behaviors across machines by inlining
them into the config file.  Whether this is a good path to explore or
not is a separate issue.)
My questions are:
   Is this 1024 char limit on config file values documented somewhere?
   Should it be considered a bug that git config can write out config
files which it can not then read (e.g. it should be changed to either
enforce the value-length limit during writing, or the parser updated
to handle large values)?

Thanks, Jeff

Next: Erik Faye-Lund
Message 1 of 4 in “Value size limits on git config files”
  1. Jeff AdamsonApr 5, 2011
  2. Erik Faye-LundApr 5, 2011
  3. Drew NorthupApr 5, 2011
  4. Erik Faye-LundApr 5, 2011

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.