MCPcopy
hub / github.com/go-git/go-git / TestWorktree

Method TestWorktree

repository_test.go:3112–3121  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

3110}
3111
3112func (s *RepositorySuite) TestWorktree(c *C) {
3113 def := memfs.New()
3114 r, _ := Init(memory.NewStorage(), def)
3115 w, err := r.Worktree()
3116 c.Assert(err, IsNil)
3117 // w.Filesystem is the worktreeFilesystem wrapper around def.
3118 wfs, ok := w.Filesystem.(*worktreeFilesystem)
3119 c.Assert(ok, Equals, true)
3120 c.Assert(wfs.Filesystem, Equals, def)
3121}
3122
3123func (s *RepositorySuite) TestWorktreeBare(c *C) {
3124 r, _ := Init(memory.NewStorage(), nil)

Callers

nothing calls this directly

Calls 3

NewStorageFunction · 0.92
InitFunction · 0.85
WorktreeMethod · 0.80

Tested by

no test coverage detected