{"thread":{"id":"48027","subject":"submodule.<name>.ignore vs git add -u","startedAt":"2018-03-12T15:59:35Z","lastAt":"2018-03-15T15:13:12Z","messageCount":2,"participants":["Miklos Vajna","Heiko Voigt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"341483","messageId":"20180312155924.elxjelkcriuwjdph@collabora.co.uk","threadId":"48027","inReplyTo":null,"subject":"submodule.<name>.ignore vs git add -u","fromName":"Miklos Vajna","fromEmail":"vmiklos@collabora.co.uk","sentAt":"2018-03-12T15:59:25Z","receivedAt":"2018-03-12T15:59:35Z","isPatch":false,"sender":{"key":"vmiklos@collabora.co.uk","avatar":null},"body":"Hi,\n\nLet's say I have a fairly simple submodule setup where I do 'git\ncheckout' inside the submodule to check out a different commit, so the\nouter repo 'git diff' shows a submodule update.\n\nIn that case\n\n        git config submodule.<name>.ignore all\n\nmakes 'git diff' or 'git commit -a' ignore the change in the outer repo,\nbut not 'git add -u'.\n\nReading the git-config documentation if this is intentional behavior,\nI'm a bit confused. It specifies that:\n\n- \"git status\" and the diff family: handle this setting\n- git submodule commands: ignore this setting\n\nSo that about 'git add -u', is it expected that it ignores this setting\nas well?\n\nI guess either the doc should say 'git add -u' doesn't handle this\nsetting or 'git add -u' should handle it. Happy to try to make a patch\nthat does the later, but I though better ask first. :-)\n\nThanks,\n\nMiklos\n"},{"id":"341749","messageId":"20180315142843.GA2103@book.hvoigt.net","threadId":"48027","inReplyTo":"20180312155924.elxjelkcriuwjdph@collabora.co.uk","subject":"Re: submodule.<name>.ignore vs git add -u","fromName":"Heiko Voigt","fromEmail":"hvoigt@hvoigt.net","sentAt":"2018-03-15T14:28:43Z","receivedAt":"2018-03-15T15:13:12Z","isPatch":false,"sender":{"key":"hvoigt@hvoigt.net","avatar":"https://avatars.githubusercontent.com/u/184958?v=4"},"body":"Hi,\n\nOn Mon, Mar 12, 2018 at 04:59:25PM +0100, Miklos Vajna wrote:\n> Let's say I have a fairly simple submodule setup where I do 'git\n> checkout' inside the submodule to check out a different commit, so the\n> outer repo 'git diff' shows a submodule update.\n> \n> In that case\n> \n>         git config submodule.<name>.ignore all\n> \n> makes 'git diff' or 'git commit -a' ignore the change in the outer repo,\n> but not 'git add -u'.\n> \n> Reading the git-config documentation if this is intentional behavior,\n> I'm a bit confused. It specifies that:\n> \n> - \"git status\" and the diff family: handle this setting\n> - git submodule commands: ignore this setting\n> \n> So that about 'git add -u', is it expected that it ignores this setting\n> as well?\n> \n> I guess either the doc should say 'git add -u' doesn't handle this\n> setting or 'git add -u' should handle it. Happy to try to make a patch\n> that does the later, but I though better ask first. :-)\n\nHave a look here for a previous discussion.\n\nhttps://public-inbox.org/git/20131204221659.GA7326@sandbox-ub/\n\nI think I never got around finishing those patches, because the\ndiscussion died and there was no reply from the original poster asking\nfor this.\n\nMaybe you could have a look at my original branch and whether that would\nbe the behavior you expect. I had a look into porting those patches to\nthe current master, but there are still some test failures.\n\nYou can see and test my current WIP branch here:\n\nhttps://github.com/hvoigt/git/commits/hv/fix_ignore_all_submodules_update1\n\nCheers Heiko\n"}]}