[PATCH] pull: honor submodule.recurse config option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
Signed-off-by: Nicolas Morey-Chaisemartin <nicolas@xxxxxxxxxxxxxxxxxxxxxx>
---
 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux