3 test_description
='packed-refs entries are covered by loose refs'
7 test_expect_success setup
'
9 git commit --allow-empty -m one &&
10 one=$(git rev-parse HEAD) &&
11 git for-each-ref >actual &&
12 echo "$one commit refs/heads/master" >expect &&
13 test_cmp expect actual &&
15 git pack-refs --all &&
16 git for-each-ref >actual &&
17 echo "$one commit refs/heads/master" >expect &&
18 test_cmp expect actual &&
20 git checkout --orphan another &&
22 git commit --allow-empty -m two &&
23 two=$(git rev-parse HEAD) &&
24 git checkout -B master &&
25 git branch -D another &&
27 git for-each-ref >actual &&
28 echo "$two commit refs/heads/master" >expect &&
29 test_cmp expect actual &&
31 git reflog expire --expire=now --all &&
33 git tag -m v1.0 v1.0 master
36 test_expect_success
'no error from stale entry in packed-refs' '
37 git describe master >actual 2>&1 &&
38 echo "v1.0" >expect &&
39 test_cmp expect actual