Debian Codegraph @

git/githistory/ref_updater_test.go

raw symbols SCIP
1 package githistoryscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/
2
3 import (
4 "testingscip-go gomod github.com/golang/go/src go1.25.0 testing/"
5
6 "github.com/git-lfs/git-lfs/v3/gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/"
7 "github.com/stretchr/testify/assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/"
8 )
9
10 func TestRefUpdaterMovesRefsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/TestRefUpdaterMovesRefs().(t *testingscip-go gomod github.com/golang/go/src go1.25.0 testing/.Tscip-go gomod github.com/golang/go/src go1.25.0 testing/T#) {
11 db := DatabaseFromFixturescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/DatabaseFromFixture().(t, "linear-history-with-tags.git")
12 root, _ := db.Rootscip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/ObjectDatabase#Root().()
13
14 AssertRefscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/AssertRef().(t, db,
15 "refs/tags/middle", HexDecodescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/HexDecode().(t, "228afe30855933151f7a88e70d9d88314fd2f191"))
16
17 updater := &refUpdaterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/refUpdater#{
18 cacheFnscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/refUpdater#cacheFn.: func(old []byte) ([]byte, bool) {
19 return HexDecodescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/HexDecode().(t, "d941e4756add6b06f5bee766fcf669f55419f13f"), true
20 },
21 refsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/refUpdater#refs.: []*gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.Refscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Ref#{
22 {
23 Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Ref#Name.: "middle",
24 Shascip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Ref#Sha.: "228afe30855933151f7a88e70d9d88314fd2f191",
25 Typescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Ref#Type.: gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.RefTypeLocalTagscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/RefTypeLocalTag.,
26 },
27 },
28 rootscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/refUpdater#root.: root,
29 dbscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/refUpdater#db.: db,
30 }
31
32 err := updater.updateRefsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/refUpdater#updateRefs().()
33
34 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/NoError().(t, err)
35
36 AssertRefscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/AssertRef().(t, db,
37 "refs/tags/middle", HexDecodescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/HexDecode().(t, "d941e4756add6b06f5bee766fcf669f55419f13f"))
38 }
39
40 func TestRefUpdaterMovesRefsWithAnnotatedTagsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/TestRefUpdaterMovesRefsWithAnnotatedTags().(t *testingscip-go gomod github.com/golang/go/src go1.25.0 testing/.Tscip-go gomod github.com/golang/go/src go1.25.0 testing/T#) {
41 db := DatabaseFromFixturescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/DatabaseFromFixture().(t, "linear-history-with-annotated-tags.git")
42 root, _ := db.Rootscip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/ObjectDatabase#Root().()
43
44 AssertRefscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/AssertRef().(t, db,
45 "refs/tags/middle", HexDecodescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/HexDecode().(t, "05797a38b05f910e6efe40dc1a5c0a046a9403e8"))
46
47 updater := &refUpdaterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/refUpdater#{
48 cacheFnscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/refUpdater#cacheFn.: func(old []byte) ([]byte, bool) {
49 return HexDecodescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/HexDecode().(t, "d941e4756add6b06f5bee766fcf669f55419f13f"), true
50 },
51 refsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/refUpdater#refs.: []*gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.Refscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Ref#{
52 {
53 Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Ref#Name.: "middle",
54 Shascip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Ref#Sha.: "05797a38b05f910e6efe40dc1a5c0a046a9403e8",
55 Typescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Ref#Type.: gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.RefTypeLocalTagscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/RefTypeLocalTag.,
56 },
57 },
58 rootscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/refUpdater#root.: root,
59 dbscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/refUpdater#db.: db,
60 }
61
62 err := updater.updateRefsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/refUpdater#updateRefs().()
63
64 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/NoError().(t, err)
65
66 AssertRefscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/AssertRef().(t, db,
67 "refs/tags/middle", HexDecodescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/HexDecode().(t, "9a3c2b4823ad6b300ef25197f0435b267d4f0ad8"))
68 }
69
70 func TestRefUpdaterIgnoresUnovedRefsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/TestRefUpdaterIgnoresUnovedRefs().(t *testingscip-go gomod github.com/golang/go/src go1.25.0 testing/.Tscip-go gomod github.com/golang/go/src go1.25.0 testing/T#) {
71 db := DatabaseFromFixturescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/DatabaseFromFixture().(t, "linear-history-with-tags.git")
72 root, _ := db.Rootscip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/ObjectDatabase#Root().()
73
74 AssertRefscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/AssertRef().(t, db,
75 "refs/tags/middle", HexDecodescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/HexDecode().(t, "228afe30855933151f7a88e70d9d88314fd2f191"))
76
77 updater := &refUpdaterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/refUpdater#{
78 cacheFnscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/refUpdater#cacheFn.: func(old []byte) ([]byte, bool) {
79 return nil, false
80 },
81 refsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/refUpdater#refs.: []*gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.Refscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Ref#{
82 {
83 Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Ref#Name.: "middle",
84 Shascip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Ref#Sha.: "228afe30855933151f7a88e70d9d88314fd2f191",
85 Typescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Ref#Type.: gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.RefTypeLocalTagscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/RefTypeLocalTag.,
86 },
87 },
88 rootscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/refUpdater#root.: root,
89 dbscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/refUpdater#db.: db,
90 }
91
92 err := updater.updateRefsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/refUpdater#updateRefs().()
93
94 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/NoError().(t, err)
95
96 AssertRefscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/AssertRef().(t, db,
97 "refs/tags/middle", HexDecodescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/githistory`/HexDecode().(t, "228afe30855933151f7a88e70d9d88314fd2f191"))
98 }