MCPcopy Create free account
hub / github.com/augmentable-dev/tickgit / argsFromOptions

Method argsFromOptions

pkg/blame/blame.go:47–61  ·  view source on GitHub ↗
(filePath string)

Source from the content-addressed store, hash-verified

45type Result map[int]Blame
46
47func (options *Options) argsFromOptions(filePath string) []string {
48 args := []string{"blame"}
49 if options.SHA != "" {
50 args = append(args, options.SHA)
51 }
52
53 for _, line := range options.Lines {
54 args = append(args, fmt.Sprintf("-L %d,%d", line, line))
55 }
56
57 args = append(args, "--porcelain", "--incremental")
58
59 args = append(args, filePath)
60 return args
61}
62
63func parsePorcelain(reader io.Reader) (Result, error) {
64 scanner := bufio.NewScanner(reader)

Callers 1

ExecFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected