summaryrefslogtreecommitdiff
path: root/t/t5531-deep-submodule-push.sh
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2017-06-01 00:30:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-01 01:36:36 (GMT)
commit4e53d6a54122b6034b9b0346c84e3e5525aed542 (patch)
treef7ba6e878313def6b1ac8d18fd0d40956beef229 /t/t5531-deep-submodule-push.sh
parent9071c078af637573a3068c6920dd4ceff6a5a69f (diff)
downloadgit-4e53d6a54122b6034b9b0346c84e3e5525aed542.zip
git-4e53d6a54122b6034b9b0346c84e3e5525aed542.tar.gz
git-4e53d6a54122b6034b9b0346c84e3e5525aed542.tar.bz2
builtin/push.c: respect 'submodule.recurse' option
The closest mapping from the boolean 'submodule.recurse' set to "yes" to the variety of submodule push modes is "on-demand", so implement that. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5531-deep-submodule-push.sh')
-rwxr-xr-xt/t5531-deep-submodule-push.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t5531-deep-submodule-push.sh b/t/t5531-deep-submodule-push.sh
index 57ba322..712c595 100755
--- a/t/t5531-deep-submodule-push.sh
+++ b/t/t5531-deep-submodule-push.sh
@@ -126,6 +126,27 @@ test_expect_success 'push succeeds if submodule commit not on remote but using o
)
'
+test_expect_success 'push succeeds if submodule commit not on remote but using auto-on-demand via submodule.recurse config' '
+ (
+ cd work/gar/bage &&
+ >recurse-on-demand-from-submodule-recurse-config &&
+ git add recurse-on-demand-from-submodule-recurse-config &&
+ git commit -m "Recurse submodule.recurse from config junk"
+ ) &&
+ (
+ cd work &&
+ git add gar/bage &&
+ git commit -m "Recurse submodule.recurse from config for gar/bage" &&
+ git -c submodule.recurse push ../pub.git master &&
+ # Check that the supermodule commit got there
+ git fetch ../pub.git &&
+ git diff --quiet FETCH_HEAD master &&
+ # Check that the submodule commit got there too
+ cd gar/bage &&
+ git diff --quiet origin/master master
+ )
+'
+
test_expect_success 'push recurse-submodules on command line overrides config' '
(
cd work/gar/bage &&