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

BUG: The .gitignore rules can't be made to cross submodule boundaries

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
May 22, 2017, 18:33 UTC
Message-ID
<CACBZZX41yrAtBvkVeL9Q=2_TxcwrDXh55gu3qLN54P_go318OA@mail.gmail.com>

When I was adding the sha1collisiondetection submodule to git.git I noticed that building git would dirty the submodule.

This is because our own Makefile adds .depend/ directories. I hacked around it by just getting the upstream project accept carrying an ignore rule for that around: https://github.com/cr-marcstevens/sha1collisiondetection/commit/e8397b26

A workaround for this is to have the Makefile add such a rule to .git/modules/sha1collisiondetection/info/exclude, but that's less convenient than being able to distribute it as a normal .gitignore rule.

The submodule.<name>.ignore config provides an overly big hammer to solve this, it would be better if we had something like submodule.<name>.gitignore=<path>. Then we could have e.g. .gitignore.sha1collisiondetection which would be added to whatever rules the repo's own .gitignore provides.

Next: Johannes Schindelin
Message 1 of 4 in “BUG: The .gitignore rules can't be made to cross submodule boundaries”
  1. Ævar Arnfjörð BjarmasonMay 22, 2017
  2. Johannes SchindelinMay 23, 2017
  3. Ævar Arnfjörð BjarmasonMay 23, 2017
  4. Stefan BellerMay 23, 2017

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.