git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* submodule.<name>.ignore vs git add -u
@ 2018-03-12 15:59 Miklos Vajna
  2018-03-15 14:28 ` Heiko Voigt
  0 siblings, 1 reply; 2+ messages in thread
From: Miklos Vajna @ 2018-03-12 15:59 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 854 bytes --]

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: submodule.<name>.ignore vs git add -u
  2018-03-12 15:59 submodule.<name>.ignore vs git add -u Miklos Vajna
@ 2018-03-15 14:28 ` Heiko Voigt
  0 siblings, 0 replies; 2+ messages in thread
From: Heiko Voigt @ 2018-03-15 14:28 UTC (permalink / raw)
  To: Miklos Vajna; +Cc: git

Hi,

On Mon, Mar 12, 2018 at 04:59:25PM +0100, Miklos Vajna wrote:
> 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. :-)

Have a look here for a previous discussion.

https://public-inbox.org/git/20131204221659.GA7326@sandbox-ub/

I think I never got around finishing those patches, because the
discussion died and there was no reply from the original poster asking
for this.

Maybe you could have a look at my original branch and whether that would
be the behavior you expect. I had a look into porting those patches to
the current master, but there are still some test failures.

You can see and test my current WIP branch here:

https://github.com/hvoigt/git/commits/hv/fix_ignore_all_submodules_update1

Cheers Heiko

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-15 15:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-12 15:59 submodule.<name>.ignore vs git add -u Miklos Vajna
2018-03-15 14:28 ` Heiko Voigt

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).