MCPcopy Create free account
hub / github.com/cwarden/git-add--interactive / RunCommandLines

Method RunCommandLines

internal/git/repository.go:129–141  ·  view source on GitHub ↗
(args ...string)

Source from the content-addressed store, hash-verified

127}
128
129func (r *Repository) RunCommandLines(args ...string) ([]string, error) {
130 output, err := r.RunCommand(args...)
131 if err != nil {
132 return nil, err
133 }
134
135 var lines []string
136 scanner := bufio.NewScanner(bytes.NewReader(output))
137 for scanner.Scan() {
138 lines = append(lines, scanner.Text())
139 }
140 return lines, scanner.Err()
141}
142
143func (r *Repository) FileExists(path string) bool {
144 fullPath := filepath.Join(r.workTree, path)

Callers 4

ParseDiffMethod · 0.95
ListUntrackedMethod · 0.95
revertCmdMethod · 0.80

Calls 1

RunCommandMethod · 0.95

Tested by

no test coverage detected