(c *C)
| 27 | ) |
| 28 | |
| 29 | func (s *WorktreeSuite) TestCommitEmptyOptions(c *C) { |
| 30 | fs := memfs.New() |
| 31 | r, err := Init(memory.NewStorage(), fs) |
| 32 | c.Assert(err, IsNil) |
| 33 | |
| 34 | w, err := r.Worktree() |
| 35 | c.Assert(err, IsNil) |
| 36 | |
| 37 | util.WriteFile(fs, "foo", []byte("foo"), 0644) |
| 38 | |
| 39 | _, err = w.Add("foo") |
| 40 | c.Assert(err, IsNil) |
| 41 | |
| 42 | hash, err := w.Commit("foo", &CommitOptions{}) |
| 43 | c.Assert(err, IsNil) |
| 44 | c.Assert(hash.IsZero(), Equals, false) |
| 45 | |
| 46 | commit, err := r.CommitObject(hash) |
| 47 | c.Assert(err, IsNil) |
| 48 | c.Assert(commit.Author.Name, Not(Equals), "") |
| 49 | } |
| 50 | |
| 51 | func (s *WorktreeSuite) TestCommitInitial(c *C) { |
| 52 | expected := plumbing.NewHash("98c4ac7c29c913f7461eae06e024dc18e80d23a4") |
nothing calls this directly
no test coverage detected