MCPcopy
hub / github.com/sinclairtarget/git-who / RevList

Function RevList

internal/git/git.go:117–152  ·  view source on GitHub ↗
(
	ctx context.Context,
	revranges []string,
	pathspecs []string,
	filters cmd.LogFilters,
)

Source from the content-addressed store, hash-verified

115}
116
117func RevList(
118 ctx context.Context,
119 revranges []string,
120 pathspecs []string,
121 filters cmd.LogFilters,
122) (_ []string, err error) {
123 defer func() {
124 if err != nil {
125 err = fmt.Errorf("error getting full rev list: %w", err)
126 }
127 }()
128
129 revs := []string{}
130
131 subprocess, err := cmd.RunRevList(ctx, revranges, pathspecs, filters)
132 if err != nil {
133 return revs, err
134 }
135
136 lines, finish := subprocess.StdoutLines()
137 for line := range lines {
138 revs = append(revs, line)
139 }
140
141 err = finish()
142 if err != nil {
143 return revs, err
144 }
145
146 err = subprocess.Wait()
147 if err != nil {
148 return revs, err
149 }
150
151 return revs, nil
152}
153
154func GetRoot() (_ string, err error) {
155 defer func() {

Callers 1

tallyFanOutFanInFunction · 0.92

Calls 3

RunRevListFunction · 0.92
StdoutLinesMethod · 0.80
WaitMethod · 0.80

Tested by

no test coverage detected