The test adds and fetches a remote repository and then lists the
imported remote-tags verifying the correct values.

Signed-off-by: Wink Saville <w...@saville.com>
---
 t/t5505-remote.sh | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index a6c0178f3a..cb30ed5cf2 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -573,6 +573,26 @@ test_expect_success 'add --tags' '
        test_cmp test/expect test/output
 '
 
+cat >test/expect <<\EOF
+origin/some-tag
+origin/foobar-tag
+--remote-tags
+EOF
+
+test_expect_success 'add --remote-tags' '
+       rm -rf add-tags &&
+       (
+               mkdir add-tags &&
+               cd add-tags &&
+               git init &&
+               git remote add -f --remote-tags origin ../one &&
+               git tag -l origin/some-tag >../test/output &&
+               git tag -l origin/foobar-tag >>../test/output &&
+               git config remote.origin.tagopt >>../test/output
+       ) &&
+       test_cmp test/expect test/output
+'
+
 cat >test/expect <<\EOF
 --no-tags
 EOF
-- 
2.17.0.393.g4573f5e134

Reply via email to