MCPcopy Index your code
hub / github.com/go-git/go-git / verifyStatus

Function verifyStatus

worktree_test.go:3347–3359  ·  view source on GitHub ↗
(c *C, marker string, w *Worktree, files []string, statuses []FileStatus)

Source from the content-addressed store, hash-verified

3345}
3346
3347func verifyStatus(c *C, marker string, w *Worktree, files []string, statuses []FileStatus) {
3348 c.Assert(len(files), Equals, len(statuses))
3349
3350 status, err := w.Status()
3351 c.Assert(err, IsNil)
3352
3353 for i, file := range files {
3354 current := status.File(file)
3355 expected := statuses[i]
3356 c.Assert(current.Worktree, Equals, expected.Worktree, Commentf("%s - [%d] : %s Worktree %s != %s", marker, i, file, statusCodeNames[current.Worktree], statusCodeNames[expected.Worktree]))
3357 c.Assert(current.Staging, Equals, expected.Staging, Commentf("%s - [%d] : %s Staging %s != %s", marker, i, file, statusCodeNames[current.Staging], statusCodeNames[expected.Staging]))
3358 }
3359}
3360
3361func (s *WorktreeSuite) TestRestoreStaged(c *C) {
3362 fs, w, names := setupForRestore(c, s)

Callers 3

setupForRestoreFunction · 0.85
TestRestoreStagedMethod · 0.85
TestRestoreBothMethod · 0.85

Calls 2

StatusMethod · 0.45
FileMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…