diff options
author | Brandon Williams <bmwill@google.com> | 2017-04-05 10:47:16 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-04-11 00:45:03 -0700 |
commit | 2a90556dde47f27e12a3f8adb1397fd05e5b6690 (patch) | |
tree | 97654f97664b31bd664cc8d7343da2f32f6005fd /t/t5545-push-options.sh | |
parent | 54cc8aca60e474e637e9d71b57ee2c6f1fb197e6 (diff) | |
download | git-2a90556dde47f27e12a3f8adb1397fd05e5b6690.tar.gz git-2a90556dde47f27e12a3f8adb1397fd05e5b6690.tar.xz |
push: propagate push-options with --recurse-submodules
Teach push --recurse-submodules to propagate push-options recursively to
the pushes performed in the submodules.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5545-push-options.sh')
-rwxr-xr-x | t/t5545-push-options.sh | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/t/t5545-push-options.sh b/t/t5545-push-options.sh index 97065e62b..f9232f5d0 100755 --- a/t/t5545-push-options.sh +++ b/t/t5545-push-options.sh @@ -142,6 +142,46 @@ test_expect_success 'push options work properly across http' ' test_cmp expect actual ' +test_expect_success 'push options and submodules' ' + test_when_finished "rm -rf parent" && + test_when_finished "rm -rf parent_upstream" && + mk_repo_pair && + git -C upstream config receive.advertisePushOptions true && + cp -r upstream parent_upstream && + test_commit -C upstream one && + + test_create_repo parent && + git -C parent remote add up ../parent_upstream && + test_commit -C parent one && + git -C parent push --mirror up && + + git -C parent submodule add ../upstream workbench && + git -C parent/workbench remote add up ../../upstream && + git -C parent commit -m "add submoule" && + + test_commit -C parent/workbench two && + git -C parent add workbench && + git -C parent commit -m "update workbench" && + + git -C parent push \ + --push-option=asdf --push-option="more structured text" \ + --recurse-submodules=on-demand up master && + + git -C upstream rev-parse --verify master >expect && + git -C parent/workbench rev-parse --verify master >actual && + test_cmp expect actual && + + git -C parent_upstream rev-parse --verify master >expect && + git -C parent rev-parse --verify master >actual && + test_cmp expect actual && + + printf "asdf\nmore structured text\n" >expect && + test_cmp expect upstream/.git/hooks/pre-receive.push_options && + test_cmp expect upstream/.git/hooks/post-receive.push_options && + test_cmp expect parent_upstream/.git/hooks/pre-receive.push_options && + test_cmp expect parent_upstream/.git/hooks/post-receive.push_options +' + stop_httpd test_done |