git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-submodule.sh respects submodule.$name.update in .git/config but not .gitmodules
@ 2013-12-06 15:48 Charlie Dyson
  2013-12-09 22:35 ` Heiko Voigt
  0 siblings, 1 reply; 10+ messages in thread
From: Charlie Dyson @ 2013-12-06 15:48 UTC (permalink / raw)
  To: git

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

Tested against: 1.8.2.1 [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
.git/config.

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

Cheers,

Charlie

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

end of thread, other threads:[~2013-12-12 21:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-06 15:48 git-submodule.sh respects submodule.$name.update in .git/config but not .gitmodules Charlie Dyson
2013-12-09 22:35 ` Heiko Voigt
2013-12-09 23:40   ` Junio C Hamano
2013-12-11 22:26     ` Jens Lehmann
2013-12-11 22:44       ` W. Trevor King
2013-12-12  1:16         ` Junio C Hamano
2013-12-12 18:57           ` Jens Lehmann
2013-12-12 19:14             ` W. Trevor King
2013-12-12 19:23             ` Jonathan Nieder
2013-12-12 21:17             ` Junio C Hamano

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 NNTP newsgroup(s).