MCPcopy Create free account
hub / github.com/go-git/go-git / TestLogNonHeadFile

Method TestLogNonHeadFile

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

Source from the content-addressed store, hash-verified

2054}
2055
2056func (s *RepositorySuite) TestLogNonHeadFile(c *C) {
2057 r, _ := Init(memory.NewStorage(), nil)
2058 err := r.clone(context.Background(), &CloneOptions{
2059 URL: s.GetBasicLocalRepositoryURL(),
2060 })
2061
2062 c.Assert(err, IsNil)
2063
2064 fileName := "README"
2065 cIter, err := r.Log(&LogOptions{FileName: &fileName})
2066 c.Assert(err, IsNil)
2067 defer cIter.Close()
2068
2069 _, err = cIter.Next()
2070 c.Assert(err, Equals, io.EOF)
2071}
2072
2073func (s *RepositorySuite) TestLogAllFileForEach(c *C) {
2074 r, _ := Init(memory.NewStorage(), nil)

Callers

nothing calls this directly

Calls 7

NewStorageFunction · 0.92
InitFunction · 0.85
cloneMethod · 0.80
LogMethod · 0.80
CloseMethod · 0.65
NextMethod · 0.65

Tested by

no test coverage detected