From: Glen Choo <chooglen@google.com>
To: git@vger.kernel.org
Cc: Jonathan Tan <jonathantanmy@google.com>,
Junio C Hamano <gitster@pobox.com>,
Glen Choo <chooglen@google.com>
Subject: [PATCH v5 1/5] t5516: add test case for pushing remote refspecs
Date: Wed, 17 Nov 2021 16:53:21 -0800 [thread overview]
Message-ID: <20211118005325.64971-2-chooglen@google.com> (raw)
In-Reply-To: <20211118005325.64971-1-chooglen@google.com>
"git push remote-name" (that is, with no refspec given on the command
line) should push the refspecs in remote.remote-name.push. There is no
test case that checks this behavior in detached HEAD, so add one.
Signed-off-by: Glen Choo <chooglen@google.com>
---
t/t5516-fetch-push.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index 8212ca56dc..7831a38dde 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 no explicit refspec 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 &&
--
2.33.GIT
next prev parent reply other threads:[~2021-11-18 0:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <id:20211028183101.41013-1-chooglen@google.com>
2021-11-18 0:53 ` [PATCH v5 0/5] remote: replace static variables with struct remote_state Glen Choo
2021-11-18 0:53 ` Glen Choo [this message]
2021-11-18 0:53 ` [PATCH v5 2/5] remote: move static variables into per-repository struct Glen Choo
2021-11-18 0:53 ` [PATCH v5 3/5] remote: use remote_state parameter internally Glen Choo
2021-11-18 0:53 ` [PATCH v5 4/5] remote: remove the_repository->remote_state from static methods Glen Choo
2021-11-18 0:53 ` [PATCH v5 5/5] remote: die if branch is not found in repository Glen Choo
2021-11-18 17:51 ` [PATCH v5 0/5] remote: replace static variables with struct remote_state Jonathan Tan
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211118005325.64971-2-chooglen@google.com \
--to=chooglen@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jonathantanmy@google.com \
/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.
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 NNTP newsgroup(s).