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

Function TestRefUpdateDefault

git/refs_test.go:9–22  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestRefUpdateDefault(t *testing.T) {
10 pushModes := []string{"simple", ""}
11 for _, pushMode := range pushModes {
12 env := newEnv(map[string][]string{
13 "push.default": []string{pushMode},
14 "branch.local.remote": []string{"ignore"},
15 "branch.local.merge": []string{"me"},
16 })
17
18 u := NewRefUpdate(env, "origin", ParseRef("refs/heads/local", ""), nil)
19 assert.Equal(t, "local", u.RemoteRef().Name, "pushmode=%q", pushMode)
20 assert.Equal(t, RefTypeLocalBranch, u.RemoteRef().Type, "pushmode=%q", pushMode)
21 }
22}
23
24func TestRefUpdateTrackedDefault(t *testing.T) {
25 pushModes := []string{"simple", "upstream", "tracking", ""}

Callers

nothing calls this directly

Calls 5

RemoteRefMethod · 0.95
newEnvFunction · 0.85
NewRefUpdateFunction · 0.85
ParseRefFunction · 0.85
EqualMethod · 0.45

Tested by

no test coverage detected