3 test_description
='ext::cmd remote "connect" helper'
6 test_expect_success setup
'
8 git commit --allow-empty -m initial &&
10 git commit --allow-empty -m second &&
12 git commit --allow-empty -m third &&
14 git tag -a -m "tip three" three &&
17 git commit --allow-empty -m fourth
20 test_expect_success clone
'
21 cmd=$(echo "echo >&2 ext::sh invoked && %S .." | sed -e "s/ /% /g") &&
22 git clone "ext::sh -c %S% ." dst &&
23 git for-each-ref refs/heads/ refs/tags/ >expect &&
26 git config remote.origin.url "ext::sh -c $cmd" &&
27 git for-each-ref refs/heads/ refs/tags/
29 test_cmp expect actual
32 test_expect_success
'update following tag' '
34 git commit --allow-empty -m fifth &&
36 git tag -a -m "tip five" five &&
37 git for-each-ref refs/heads/ refs/tags/ >expect &&
41 git for-each-ref refs/heads/ refs/tags/ >../actual
43 test_cmp expect actual
46 test_expect_success
'update backfilled tag' '
48 git commit --allow-empty -m sixth &&
50 git tag -a -m "tip two" two three^1 &&
51 git for-each-ref refs/heads/ refs/tags/ >expect &&
55 git for-each-ref refs/heads/ refs/tags/ >../actual
57 test_cmp expect actual
60 test_expect_success
'update backfilled tag without primary transfer' '
62 git tag -a -m "tip one " one two^1 &&
63 git for-each-ref refs/heads/ refs/tags/ >expect &&
67 git for-each-ref refs/heads/ refs/tags/ >../actual
69 test_cmp expect actual