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

Method String

status.go:40–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38}
39
40func (s Status) String() string {
41 buf := bytes.NewBuffer(nil)
42 for path, status := range s {
43 if status.Staging == Unmodified && status.Worktree == Unmodified {
44 continue
45 }
46
47 if status.Staging == Renamed {
48 path = fmt.Sprintf("%s -> %s", path, status.Extra)
49 }
50
51 fmt.Fprintf(buf, "%c%c %s\n", status.Staging, status.Worktree, path)
52 }
53
54 return buf.String()
55}
56
57// FileStatus contains the status of a file in the worktree
58type FileStatus struct {

Callers

nothing calls this directly

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected