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

submodule.<name>.ignore vs git add -u

From
MVMiklos Vajna <vmiklos@collabora.co.uk>
Date
Mar 12, 2018, 15:59 UTC
Message-ID
<20180312155924.elxjelkcriuwjdph@collabora.co.uk>
Hi,

Let's say I have a fairly simple submodule setup where I do 'git checkout' inside the submodule to check out a different commit, so the outer repo 'git diff' shows a submodule update.

In that case
        git config submodule.<name>.ignore all

makes 'git diff' or 'git commit -a' ignore the change in the outer repo, but not 'git add -u'.

Reading the git-config documentation if this is intentional behavior, I'm a bit confused. It specifies that:

- "git status" and the diff family: handle this setting
- git submodule commands: ignore this setting

So that about 'git add -u', is it expected that it ignores this setting as well?

I guess either the doc should say 'git add -u' doesn't handle this setting or 'git add -u' should handle it. Happy to try to make a patch that does the later, but I though better ask first. :-)

Thanks,
Miklos
Next: Heiko Voigt
Message 1 of 2 in “submodule.<name>.ignore vs git add -u”
  1. Miklos VajnaMar 12, 2018
  2. Heiko VoigtMar 15, 2018

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.