From: Mikhail Glushenkov <foldr@codedgers.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Mikhail Glushenkov <foldr@codedgers.com>
Subject: [PATCH] Make 'submodule update' honor the 'update' setting in .gitmodules.
Date: Thu, 6 Aug 2009 05:56:17 +0200 [thread overview]
Message-ID: <1249530977-17501-1-git-send-email-foldr@codedgers.com> (raw)
Make the 'submodule update' command honor the 'submodule.$path.update' setting
in .gitmodules unless this setting is overridden in '.git/config' or with
--rebase/--merge options.
Signed-off-by: Mikhail Glushenkov <foldr@codedgers.com>
---
git-submodule.sh | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index ebed711..636023a 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -372,6 +372,15 @@ cmd_update()
name=$(module_name "$path") || exit
url=$(git config submodule."$name".url)
update_module=$(git config submodule."$name".update)
+
+ if test -z "$update_module"
+ then
+ update_module="$(git config -f .gitmodules submodule."$name".update)"
+ test -z "$update_module" ||
+ git config submodule."$name".update "$update_module" ||
+ die "Failed to register update mode for submodule path '$path'"
+ fi
+
if test -z "$url"
then
# Only mention uninitialized submodules when its
--
1.6.4
next reply other threads:[~2009-08-06 3:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-06 3:56 Mikhail Glushenkov [this message]
2009-08-07 21:54 ` [PATCH] Make 'submodule update' honor the 'update' setting in .gitmodules Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2009-08-06 3:36 Mikhail Glushenkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1249530977-17501-1-git-send-email-foldr@codedgers.com \
--to=foldr@codedgers.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.