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

Method TestLogNonHeadFile

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

Source from the content-addressed store, hash-verified

2022}
2023
2024func (s *RepositorySuite) TestLogNonHeadFile(c *C) {
2025 r, _ := Init(memory.NewStorage(), nil)
2026 err := r.clone(context.Background(), &CloneOptions{
2027 URL: s.GetBasicLocalRepositoryURL(),
2028 })
2029
2030 c.Assert(err, IsNil)
2031
2032 fileName := "README"
2033 cIter, err := r.Log(&LogOptions{FileName: &fileName})
2034 c.Assert(err, IsNil)
2035 defer cIter.Close()
2036
2037 _, err = cIter.Next()
2038 c.Assert(err, Equals, io.EOF)
2039}
2040
2041func (s *RepositorySuite) TestLogAllFileForEach(c *C) {
2042 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