From: Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com>
To: <git@vger.kernel.org>
Cc: <magnus@homann.se>
Subject: [PATCH] pull: honor submodule.recurse config option
Date: Fri, 1 Sep 2017 09:29:38 +0200 [thread overview]
Message-ID: <cc70ea38-9980-120f-afaa-af7a6e3a8c36@morey-chaisemartin.com> (raw)
In-Reply-To: <eba8e727-25ef-b34b-cd2b-e92602709c9b@homann.se>
git pull used to not parse the submodule.recurse config option and simply
consider the --recurse-submodules CLI option.
When using the config option, submodules would only be fetched recursively
while the CLi option would tigger both fetch and update/merge.
Reported-by: Magnus Homann <magnus@homann.se>
Signed-off-by: Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com>
---
builtin/pull.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/builtin/pull.c b/builtin/pull.c
index 7fe281414..e4edf23c5 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -326,6 +326,11 @@ static int git_pull_config(const char *var, const char *value, void *cb)
config_autostash = git_config_bool(var, value);
return 0;
}
+ if (!strcmp(var, "submodule.recurse")) {
+ int r = git_config_bool(var, value) ?
+ RECURSE_SUBMODULES_ON : RECURSE_SUBMODULES_OFF;
+ recurse_submodules = r;
+ }
return git_default_config(var, value, cb);
}
--
2.14.1.460.g196d2604f
next prev parent reply other threads:[~2017-09-01 7:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-01 5:39 submodule: --recurse-submodules vs. submodule.recurse=true Magnus Homann
2017-09-01 7:29 ` Nicolas Morey-Chaisemartin [this message]
2017-09-01 17:11 ` [PATCH] pull: honor submodule.recurse config option Stefan Beller
2017-09-01 18:15 ` René Scharfe
2017-09-01 17:28 ` Jonathan Nieder
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cc70ea38-9980-120f-afaa-af7a6e3a8c36@morey-chaisemartin.com \
--to=nicolas@morey-chaisemartin.com \
--cc=git@vger.kernel.org \
--cc=magnus@homann.se \
/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.
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).