MCPcopy Index your code
hub / github.com/git-lfs/git-lfs / TestRefString

Function TestRefString

git/git_test.go:16–47  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

14)
15
16func TestRefString(t *testing.T) {
17 const sha = "0000000000000000000000000000000000000000"
18 for s, r := range map[string]*Ref{
19 "refs/heads/master": {
20 Name: "master",
21 Type: RefTypeLocalBranch,
22 Sha: sha,
23 },
24 "refs/remotes/origin/master": {
25 Name: "origin/master",
26 Type: RefTypeRemoteBranch,
27 Sha: sha,
28 },
29 "refs/tags/v1.0.0": {
30 Name: "v1.0.0",
31 Type: RefTypeLocalTag,
32 Sha: sha,
33 },
34 "HEAD": {
35 Name: "HEAD",
36 Type: RefTypeHEAD,
37 Sha: sha,
38 },
39 "other": {
40 Name: "other",
41 Type: RefTypeOther,
42 Sha: sha,
43 },
44 } {
45 assert.Equal(t, s, r.Refspec())
46 }
47}
48
49func TestParseRefs(t *testing.T) {
50 tests := map[string]RefType{

Callers

nothing calls this directly

Calls 2

RefspecMethod · 0.80
EqualMethod · 0.45

Tested by

no test coverage detected