gitmodules(5) states that submodule.$name.update should be defined in
.gitmodules. However in cmd_update() in, git config
is used with "-f .gitmodules". Consequently this flag is only
respected in .git/config

Tested against: [sorry! I've checked the relevant bit of
source and it's the same]

Steps to reproduce:
$ git init
$ git submodule add -b master someproject
$ git config -f .gitmodules --add submodule.someproject.update merge
$ # Go to someproject and commit something
$ git submodule update --remote

The latter does not perform a merge, and behaviour is visibly
different to adding --merge.

I would submit a patch but I'm not completely sure what the behaviour
would be - simply adding "-f .gitmodules" would hurt users that have
adopted the practice of specifying their update preference in

Perhaps the right thing to do is read from .git/config and fall back
to .gitmodules using get_submodule_config().


To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to