diff options
author | Glen Choo <chooglen@google.com> | 2021-10-28 11:30:56 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-28 13:09:47 -0700 |
commit | cd8011f44b3828b4f2c5a532e0a60a9e3a72116e (patch) | |
tree | f63114a6e41943fd6835e7282b3656292fbe0a72 | |
parent | 2bd2f258f4195ac54293a3f45b86457c0bd5fc11 (diff) |
t5516: add test case for pushing remote refspecs
In detached HEAD, "git push remote-name" should push the refspecs in
remote.remote-name.push. Since there is no test case that checks this
behavior, add one.
Signed-off-by: Glen Choo <chooglen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | t/t5516-fetch-push.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh index 8212ca56dc..d4c2f1b68f 100755 --- a/t/t5516-fetch-push.sh +++ b/t/t5516-fetch-push.sh @@ -541,6 +541,15 @@ do done +test_expect_success "push to remote with detached HEAD and config remote.*.push = src:dest" ' + mk_test testrepo heads/main && + git checkout $the_first_commit && + test_config remote.there.url testrepo && + test_config remote.there.push refs/heads/main:refs/heads/main && + git push there && + check_push_result testrepo $the_commit heads/main +' + test_expect_success 'push with remote.pushdefault' ' mk_test up_repo heads/main && mk_test down_repo heads/main && |