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

[PATCH 0/2] Submodules: Add the new config option "ignore"

From
Jens Lehmann <jens.lehmann@web.de>
Date
Jul 26, 2010, 18:26 UTC
Message-ID
<4C4DD33F.4020104@web.de>

These two patches are extremly useful for those users who chose submodules because they wanted to reduce the time it takes for "git status" and "git diff" to recurse through the whole work tree by putting sometimes large amounts of files into submodules, which weren't scanned in the past.

Since 1.7.0 "git status" and "git diff" recurse through submodule work trees, which has a - sometimes drastic - performance impact when large submodules are present. Using the "ignore=dirty" config option restores the former behaviour.

This option can be set in the .gitmodules file or in .git/config, any settings found in the latter override those from .gitmodules. This enables the distribution of a default setting for this option by simply committing a modified .gitmodules file without each developer having to call "git submodule sync". When using "git status" or "git diff" with "--ignore-submodules=none" option the default behavior of scanning all submodules work trees can be restored temporarily.

Comments?
Jens Lehmann (2):
  Submodules: Add the new "ignore" config option for diff and status
  Submodules: Use "ignore" settings from .gitmodules too for diff and
    status
 Documentation/config.txt       |   13 ++++
 Documentation/diff-options.txt |    6 ++-
 Documentation/git-status.txt   |    6 ++-
 Documentation/gitmodules.txt   |   15 ++++
 builtin/commit.c               |    2 +
 builtin/diff-files.c           |    2 +
 builtin/diff-index.c           |    2 +
 builtin/diff-tree.c            |    2 +
 builtin/diff.c                 |    2 +
 diff-lib.c                     |   15 +++--
 diff.c                         |   35 ++++++++--
 diff.h                         |    1 +
 submodule.c                    |   63 ++++++++++++++++-
 submodule.h                    |    4 +
 t/t4027-diff-submodule.sh      |  139 ++++++++++++++++++++++++++++++++++++
 t/t7508-status.sh              |  154 ++++++++++++++++++++++++++++++++++++++-
 wt-status.c                    |    8 ++-
 17 files changed, 449 insertions(+), 20 deletions(-)
-- 
1.7.2.223.g830604.dirty
Next: Jens Lehmann
Message 1 of 15 in “Submodules: Add the new config option "ignore"”
  1. 0/2 Submodules: Add the new config option "ignore"Jens Lehmann, Jul 26, 2010
  2. 1/2 Submodules: Add the new "ignore" config option for diff and statusJens Lehmann, Jul 26, 2010
  3. 2/2 Submodules: Use "ignore" settings from .gitmodules too for diff and statusJens Lehmann, Jul 26, 2010
  4. Junio C HamanoJul 28, 2010
  5. 0/2 Submodules: Add the new config option "ignore"Jens Lehmann, Aug 5, 2010
  6. 1/2 Submodules: Add the new "ignore" config option for diff and statusJens Lehmann, Aug 5, 2010
  7. 2/2 Submodules: Use "ignore" settings from .gitmodules too for diff and statusJens Lehmann, Aug 5, 2010
  8. Junio C HamanoAug 5, 2010
  9. Jens LehmannAug 5, 2010
  10. Junio C HamanoAug 9, 2010
  11. Johannes SchindelinAug 5, 2010
  12. Junio C HamanoAug 5, 2010
  13. Jens LehmannAug 5, 2010
  14. Add tests for the diff.ignoreSubmodules config optionJens Lehmann, Aug 5, 2010
  15. Junio C HamanoAug 9, 2010

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.