{"thread":{"id":"20421","subject":"[PATCH] Make 'submodule update' honor the 'update' setting in .gitmodules.","startedAt":"2009-08-06T03:36:09Z","lastAt":"2009-08-06T03:36:09Z","messageCount":1,"participants":["Mikhail Glushenkov"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"119739","messageId":"1249529769-15720-1-git-send-email-the.dead.shall.rise@gmail.com","threadId":"20421","inReplyTo":null,"subject":"[PATCH] Make 'submodule update' honor the 'update' setting in .gitmodules.","fromName":"Mikhail Glushenkov","fromEmail":"the.dead.shall.rise@gmail.com","sentAt":"2009-08-06T03:36:09Z","receivedAt":"2009-08-06T03:36:09Z","isPatch":true,"sender":{"key":"the.dead.shall.rise@gmail.com","avatar":null},"body":"Make the 'submodule update' command use the 'submodule.$path.update' setting in\n.gitmodules unless this setting is overridden in '.git/config' or with\n--rebase/--merge options.\n\nSigned-off-by: Mikhail Glushenkov <the.dead.shall.rise@gmail.com>\n---\n git-submodule.sh |    9 +++++++++\n 1 files changed, 9 insertions(+), 0 deletions(-)\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex ebed711..636023a 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -372,6 +372,15 @@ cmd_update()\n \t\tname=$(module_name \"$path\") || exit\n \t\turl=$(git config submodule.\"$name\".url)\n \t\tupdate_module=$(git config submodule.\"$name\".update)\n+\n+\t\tif test -z \"$update_module\"\n+\t\tthen\n+\t\t    update_module=\"$(git config -f .gitmodules submodule.\"$name\".update)\"\n+\t\t    test -z \"$update_module\" ||\n+\t\t    git config submodule.\"$name\".update \"$update_module\" ||\n+\t\t    die \"Failed to register update mode for submodule path '$path'\"\n+\t\tfi\n+\n \t\tif test -z \"$url\"\n \t\tthen\n \t\t\t# Only mention uninitialized submodules when its\n-- \n1.6.4\n"}]}