t4119: add test for traditional patch and different p_value
[gitweb.git] / t / t5510-fetch.sh
index df0ae4811b29668c8c0918fec3d7b7b14369dee9..50c64856f0fd35fd14007e0603a1cf58ce702cec 100755 (executable)
@@ -22,16 +22,15 @@ test_expect_success "clone and setup child repos" '
        cd .. &&
        git clone . two &&
        cd two &&
-       git repo-config branch.master.remote one &&
-       {
-               echo "URL: ../one/.git/"
-               echo "Pull: refs/heads/master:refs/heads/one"
-       } >.git/remotes/one
+       git config branch.master.remote one &&
+       git config remote.one.url ../one/.git/ &&
+       git config remote.one.fetch refs/heads/master:refs/heads/one &&
        cd .. &&
        git clone . three &&
        cd three &&
-       git repo-config branch.master.remote two &&
-       git repo-config branch.master.merge refs/heads/one &&
+       git config branch.master.remote two &&
+       git config branch.master.merge refs/heads/one &&
+       mkdir -p .git/remotes &&
        {
                echo "URL: ../two/.git/"
                echo "Pull: refs/heads/master:refs/heads/two"
@@ -66,4 +65,20 @@ test_expect_success "fetch test for-merge" '
        cut -f -2 .git/FETCH_HEAD >actual &&
        diff expected actual'
 
+test_expect_success 'fetch following tags' '
+
+       cd "$D" &&
+       git tag -a -m 'annotated' anno HEAD &&
+       git tag light HEAD &&
+
+       mkdir four &&
+       cd four &&
+       git init &&
+
+       git fetch .. :track &&
+       git show-ref --verify refs/tags/anno &&
+       git show-ref --verify refs/tags/light
+
+'
+
 test_done