GitLabgitlab-org

cli

main
ply8 git calls316 ms102 KiB6 cachedprotocol v2
467 lines14 KiBRaw
1package ciutils
3import (
4 "context"
5 "fmt"
6 "io"
7 "strconv"
8 "strings"
9 "sync"
10 "time"
12 "charm.land/huh/v2"
14 gitlab "gitlab.com/gitlab-org/api/client-go/v3"
16 "gitlab.com/gitlab-org/cli/internal/api"
17 "gitlab.com/gitlab-org/cli/internal/git"
18 "gitlab.com/gitlab-org/cli/internal/glrepo"
19 "gitlab.com/gitlab-org/cli/internal/iostreams"
20 "gitlab.com/gitlab-org/cli/internal/tableprinter"
21 "gitlab.com/gitlab-org/cli/internal/utils"
24func makeHyperlink(s *iostreams.IOStreams, pipeline *gitlab.PipelineInfo) string {
25 return s.Hyperlink(fmt.Sprintf("%d", pipeline.ID), pipeline.WebURL)
28// GetPipelineWithFallback gets the latest pipeline for a branch, falling back to MR head pipeline
29// for merged results pipelines where the direct branch lookup may fail or returns a pipeline with no jobs.
30func GetPipelineWithFallback(ctx context.Context, client *gitlab.Client, repoName, branch string, ios *iostreams.IOStreams) (*gitlab.Pipeline, error) {
31 // First try: Get pipeline by branch name
32 pipeline, _, err := client.Pipelines.GetLatestPipeline(repoName, &gitlab.GetLatestPipelineOptions{Ref: new(branch)}, gitlab.WithContext(ctx))
33 if err == nil {
34 // Check if the pipeline has jobs - some pipelines (e.g., external pipelines) may have no jobs
35 jobs, _, jobsErr := client.Jobs.ListPipelineJobs(repoName, pipeline.ID, &gitlab.ListJobsOptions{
36 ListOptions: gitlab.ListOptions{PerPage: 1},
37 })
38 if jobsErr == nil && len(jobs) > 0 {
39 // Pipeline has jobs, return it
40 return pipeline, nil
41 }
42 // Pipeline has no jobs, try MR fallback below
43 }
45 // Fallback: Look for MR pipeline (for merged results pipelines or when branch pipeline has no jobs)
46 mr, mrErr := getMRForBranch(ctx, client, repoName, branch, ios)
47 if mrErr != nil {
48 // If we had a pipeline from the branch lookup (even with no jobs), return it
49 if pipeline != nil {
50 return pipeline, nil
51 }
52 return nil, fmt.Errorf("no pipeline found for branch %s and failed to find associated merge request: %w", branch, mrErr)
53 }
55 if mr.HeadPipeline == nil {
56 // If we had a pipeline from the branch lookup (even with no jobs), return it
57 if pipeline != nil {
58 return pipeline, nil
59 }
60 return nil, fmt.Errorf("no pipeline found. It might not exist yet. Check your pipeline configuration")
61 }
63 // Get the full pipeline details using the MR's head pipeline ID
64 mrPipeline, _, pipelineErr := client.Pipelines.GetPipeline(repoName, mr.HeadPipeline.ID, gitlab.WithContext(ctx))
65 if pipelineErr != nil {
66 // If we had a pipeline from the branch lookup, return it as fallback
67 if pipeline != nil {
68 return pipeline, nil
69 }
70 return nil, pipelineErr
71 }
73 return mrPipeline, nil
76// getMRForBranch finds a merge request for the given branch
77func getMRForBranch(ctx context.Context, client *gitlab.Client, repoName, branch string, ios *iostreams.IOStreams) (*gitlab.MergeRequest, error) {
78 opts := &gitlab.ListProjectMergeRequestsOptions{
79 SourceBranch: new(branch),
80 }
82 mrs, err := api.ListMRs(client, repoName, opts)
83 if err != nil {
84 return nil, fmt.Errorf("failed to get merge requests for %q: %w", branch, err)
85 }
87 if len(mrs) == 0 {
88 return nil, fmt.Errorf("no merge request available for %q", branch)
89 }
91 var selectedMR *gitlab.BasicMergeRequest
93 // If exactly one MR, use it
94 if len(mrs) == 1 {
95 selectedMR = mrs[0]
96 } else {
97 // Multiple MRs exist - need to handle selection
98 if ios == nil || !ios.PromptEnabled() {
99 // Build error message with list of possible MRs
100 var mrNames []string
101 for _, mr := range mrs {
102 mrNames = append(mrNames, fmt.Sprintf("!%d (%s) by @%s", mr.IID, branch, mr.Author.Username))
103 }
104 return nil, fmt.Errorf("merge request ID number required. Possible matches:\n\n%s", strings.Join(mrNames, "\n"))
105 }
107 // Prompt user to select
108 mrMap := map[string]*gitlab.BasicMergeRequest{}
109 var mrNames []string
110 for i := range mrs {
111 t := fmt.Sprintf("!%d (%s) by @%s", mrs[i].IID, branch, mrs[i].Author.Username)
112 mrMap[t] = mrs[i]
113 mrNames = append(mrNames, t)
114 }
116 pickedMR := mrNames[0]
117 err = ios.Select(ctx, &pickedMR, "Multiple merge requests exist for this branch. Select one:", mrNames)
118 if err != nil {
119 return nil, fmt.Errorf("you must select a merge request: %w", err)
120 }
122 selectedMR = mrMap[pickedMR]
123 }
125 // Fetch the full MR to get HeadPipeline
126 fullMR, _, err := client.MergeRequests.GetMergeRequest(repoName, selectedMR.IID, &gitlab.GetMergeRequestsOptions{})
127 if err != nil {
128 return nil, fmt.Errorf("failed to get merge request details: %w", err)
129 }
131 return fullMR, nil
134func DisplaySchedules(i *iostreams.IOStreams, s []*gitlab.PipelineSchedule, projectID string) string {
135 if len(s) > 0 {
136 table := tableprinter.NewTablePrinter()
137 table.AddRow("ID", "Description", "Cron", "Owner", "Active")
138 for _, schedule := range s {
139 table.AddRow(schedule.ID, schedule.Description, schedule.Cron, schedule.Owner.Username, schedule.Active)
140 }
142 return table.Render()
143 }
145 // return empty string, since when there is no schedule, the title will already display it accordingly
146 return ""
149func DisplayMultiplePipelines(s *iostreams.IOStreams, p []*gitlab.PipelineInfo, projectID string) string {
150 if len(p) == 0 {
151 return "No Pipelines available on " + projectID
152 }
154 c := s.Color()
156 table := tableprinter.NewTablePrinter()
157 table.AddRow("State", "IID", "Ref", "Created")
159 for _, pipeline := range p {
160 duration := ""
161 if pipeline.CreatedAt != nil {
162 duration = c.Magenta("(" + utils.TimeToPrettyTimeAgo(*pipeline.CreatedAt) + ")")
163 }
165 pipeState := fmt.Sprintf("(%s) • #%s", pipeline.Status, makeHyperlink(s, pipeline))
166 switch pipeline.Status {
167 case string(gitlab.Running):
168 pipeState = c.Blue(pipeState)
169 case string(gitlab.Success):
170 pipeState = c.Green(pipeState)
171 case string(gitlab.Failed):
172 pipeState = c.Red(pipeState)
173 default:
174 pipeState = c.Gray(pipeState)
175 }
177 table.AddRow(pipeState, fmt.Sprintf("(#%d)", pipeline.IID), pipeline.Ref, duration)
178 }
180 return table.Render()
183const DefaultTracePollInterval = 3 * time.Second
185// RunTraceJob streams jobID's trace to w. A zero pollInterval uses
186// DefaultTracePollInterval.
187func RunTraceJob(ctx context.Context, apiClient *gitlab.Client, w io.Writer, pid any, jobID int64, pollInterval time.Duration) error {
188 if pollInterval == 0 {
189 pollInterval = DefaultTracePollInterval
190 }
191 return runTrace(ctx, apiClient, w, pid, jobID, pollInterval)
194func runTrace(ctx context.Context, apiClient *gitlab.Client, w io.Writer, pid any, jobId int64, pollInterval time.Duration) error {
195 var once sync.Once
196 var offset int64
198 fmt.Fprintln(w, "Getting job trace...") //nolint:forbidigo // w is a generic io.Writer, not always StdOut/StdErr
199 ticker := time.NewTicker(pollInterval)
200 defer ticker.Stop()
201 for {
202 select {
203 case <-ctx.Done():
204 return nil
205 case <-ticker.C:
206 }
207 job, _, err := apiClient.Jobs.GetJob(pid, jobId)
208 if err != nil {
209 return fmt.Errorf("failed to find job: %w", err)
210 }
211 switch job.Status {
212 case string(gitlab.Pending):
213 fmt.Fprintf(w, "%s is pending... waiting for job to start.\n", job.Name) //nolint:forbidigo // w is a generic io.Writer, not always StdOut/StdErr
214 continue
215 case string(gitlab.Manual):
216 fmt.Fprintf(w, "Manual job %s not started, waiting for job to start.\n", job.Name) //nolint:forbidigo // w is a generic io.Writer, not always StdOut/StdErr
217 continue
218 case string(gitlab.Skipped):
219 fmt.Fprintf(w, "%s has been skipped.\n", job.Name) //nolint:forbidigo // w is a generic io.Writer, not always StdOut/StdErr
220 return nil
221 }
222 once.Do(func() {
223 fmt.Fprintf(w, "Showing logs for %s job #%d.\n", job.Name, job.ID) //nolint:forbidigo // w is a generic io.Writer, not always StdOut/StdErr
224 })
225 trace, _, err := apiClient.Jobs.GetTraceFile(pid, jobId)
226 if err != nil {
227 return fmt.Errorf("failed to find job: %w", err)
228 }
229 if trace == nil {
230 return fmt.Errorf("failed to find job: trace response was empty for job %d", jobId)
231 }
232 _, _ = io.CopyN(io.Discard, trace, offset)
233 lenT, err := io.Copy(w, trace)
234 if err != nil {
235 return err
236 }
237 offset += lenT
239 if job.Status == string(gitlab.Success) ||
240 job.Status == string(gitlab.Failed) ||
241 job.Status == string(gitlab.Canceled) {
242 return nil
243 }
244 }
247func GetJobId(ctx context.Context, inputs *JobInputs, opts *JobOptions) (int64, error) {
248 // If the user hasn't supplied an argument, we display the jobs list interactively.
249 if inputs.JobName == "" {
250 return getJobIdInteractive(ctx, inputs, opts)
251 }
253 // If the user supplied a job ID, we can use it directly.
254 if jobID, err := strconv.Atoi(inputs.JobName); err == nil {
255 return int64(jobID), nil
256 }
258 // Otherwise, we try to find the latest job ID based on the job name.
259 pipelineId, err := getPipelineId(ctx, inputs, opts)
260 if err != nil {
261 return 0, fmt.Errorf("get pipeline: %w", err)
262 }
264 // This is also the default
265 options := &gitlab.ListJobsOptions{
266 ListOptions: gitlab.ListOptions{
267 PerPage: 20,
268 Page: 1,
269 },
270 }
272 sawAnyJobs := false
273 for job, err := range gitlab.Scan2(func(p gitlab.PaginationOptionFunc) ([]*gitlab.Job, *gitlab.Response, error) {
274 return opts.Client.Jobs.ListPipelineJobs(opts.Repo.FullName(), pipelineId, options, p, gitlab.WithContext(ctx))
275 }) {
276 if err != nil {
277 return 0, fmt.Errorf("list pipeline jobs: %w", err)
278 }
279 sawAnyJobs = true
281 if job.Name == inputs.JobName {
282 return job.ID, nil
283 }
284 }
286 if !sawAnyJobs {
287 return 0, fmt.Errorf("pipeline %d contains no jobs at all", pipelineId)
288 }
290 return 0, fmt.Errorf("pipeline %d contains no jobs with the name %s", pipelineId, inputs.JobName)
293func getPipelineId(ctx context.Context, inputs *JobInputs, opts *JobOptions) (int64, error) {
294 if inputs.PipelineId != 0 {
295 return int64(inputs.PipelineId), nil
296 }
298 branch := GetBranch(inputs.Branch, opts.BranchFunc, opts.Repo, opts.Client)
299 if branch == "" {
300 return 0, fmt.Errorf("unable to determine branch")
301 }
303 // Use fallback logic for robust pipeline lookup including MR pipelines
304 pipeline, err := GetPipelineWithFallback(ctx, opts.Client, opts.Repo.FullName(), branch, opts.IO)
305 if err != nil {
306 return 0, fmt.Errorf("failed to get pipeline for branch %s: %w", branch, err)
307 }
308 return pipeline.ID, nil
311// GetDefaultBranch fetches the repository's default branch from GitLab API.
312// Falls back to git.DefaultBranchName if the API call fails or returns empty.
313func GetDefaultBranch(repo glrepo.Interface, client *gitlab.Client) string {
314 if repo == nil || client == nil {
315 return git.DefaultBranchName
316 }
317 project, err := api.GetProject(client, repo.FullName())
318 if err != nil || project.DefaultBranch == "" {
319 return git.DefaultBranchName
320 }
321 return project.DefaultBranch
324// GetBranch returns the specified branch, current git branch, or the default branch from API
325func GetBranch(branch string, currentBranch func() (string, error), repo glrepo.Interface, client *gitlab.Client) string {
326 if branch != "" {
327 return branch
328 }
329 if currentBranch != nil {
330 if gitBranch, _ := currentBranch(); gitBranch != "" {
331 return gitBranch
332 }
333 }
334 return GetDefaultBranch(repo, client)
337func getJobIdInteractive(ctx context.Context, inputs *JobInputs, opts *JobOptions) (int64, error) {
338 pipelineId, err := getPipelineId(ctx, inputs, opts)
339 if err != nil {
340 return 0, err
341 }
343 opts.IO.LogInfof("Getting jobs for pipeline %d...\n\n", pipelineId)
345 listOptions := &gitlab.ListJobsOptions{
346 ListOptions: gitlab.ListOptions{
347 PerPage: 100,
348 },
349 }
350 jobs, err := gitlab.ScanAndCollect(func(p gitlab.PaginationOptionFunc) ([]*gitlab.Job, *gitlab.Response, error) {
351 return opts.Client.Jobs.ListPipelineJobs(opts.Repo.FullName(), pipelineId, listOptions, p, gitlab.WithContext(ctx))
352 })
353 if err != nil {
354 return 0, err
355 }
357 options := make([]huh.Option[int64], 0)
358 for _, job := range jobs {
359 if inputs.SelectionPredicate == nil || inputs.SelectionPredicate(job) {
360 label := fmt.Sprintf("%s (%d) - %s", job.Name, job.ID, job.Status)
361 options = append(options, huh.NewOption(label, job.ID))
362 }
363 }
365 if len(options) == 0 {
366 pipeline, _, err := opts.Client.Pipelines.GetPipeline(opts.Repo.FullName(), pipelineId)
367 if err != nil {
368 return 0, err
369 }
370 // use commit statuses to show external jobs
371 cs, _, err := opts.Client.Commits.GetCommitStatuses(opts.Repo.FullName(), pipeline.SHA, &gitlab.GetCommitStatusesOptions{All: new(true)})
372 if err != nil {
373 return 0, err
374 }
376 c := opts.IO.Color()
378 opts.IO.LogInfof("%s", "Getting external jobs...\n")
379 for _, status := range cs {
380 var s string
382 switch status.Status {
383 case string(gitlab.Success):
384 s = c.Green(status.Status)
385 case "error":
386 s = c.Red(status.Status)
387 default:
388 s = c.Gray(status.Status)
389 }
390 opts.IO.LogInfof("(%s) %s\nURL: %s\n\n", s, c.Bold(status.Name), c.Gray(status.TargetURL))
391 }
393 opts.IO.LogError("Pipeline has no jobs or external statuses. " +
394 "Check for errors in your '.gitlab-ci.yml' and your pipeline configuration.")
395 return 0, nil
396 }
398 messagePrompt := inputs.SelectionPrompt
399 if messagePrompt == "" {
400 messagePrompt = "Select pipeline job to trace:"
401 }
403 var selectedJobID int64
404 selector := huh.NewSelect[int64]().
405 Title(messagePrompt).
406 Options(options...).
407 Value(&selectedJobID)
409 err = opts.IO.Run(ctx, selector)
410 if err != nil {
411 return 0, err
412 }
414 return selectedJobID, nil
417type JobInputs struct {
418 JobName string
419 Branch string
420 PipelineId int
421 SelectionPrompt string
422 SelectionPredicate func(s *gitlab.Job) bool
425type JobOptions struct {
426 Client *gitlab.Client
427 Repo glrepo.Interface
428 IO *iostreams.IOStreams
429 BranchFunc func() (string, error)
430 PollInterval time.Duration // interval between trace polls; defaults to 3s if zero
433func TraceJob(ctx context.Context, inputs *JobInputs, opts *JobOptions) error {
434 jobID, err := GetJobId(ctx, inputs, opts)
435 if err != nil {
436 opts.IO.LogError("invalid job ID:", inputs.JobName)
437 return err
438 }
439 if jobID == 0 {
440 return nil
441 }
442 pollInterval := opts.PollInterval
443 if pollInterval == 0 {
444 pollInterval = DefaultTracePollInterval
445 }
446 opts.IO.LogInfo()
447 return runTrace(ctx, opts.Client, opts.IO.StdOut, opts.Repo.FullName(), jobID, pollInterval)
450// IDsFromArgs parses list of IDs from space or comma-separated values
451func IDsFromArgs(args []string) ([]int, error) {
452 var parsedValues []int
454 f := func(r rune) bool {
455 return r == ',' || r == ' '
456 }
458 processed := strings.FieldsFunc(strings.Join(args, " "), f)
459 for _, v := range processed {
460 id, err := strconv.Atoi(v)
461 if err != nil {
462 return nil, err
463 }
464 parsedValues = append(parsedValues, id)
465 }
466 return parsedValues, nil
Diagnostics8 git calls · 316 ms
CallStatusSizeTime0316 ms
discover200185 B4 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=2
git.response.bytes=185
git.server.agent=git/2.56.g1891de4-Linux
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch server-option object-format
git.server.fetch=shallow wait-for-done filter
git.protocol.version=2
git.pkt.frames=9
git.pkt.data=7
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=185
git.pkt.payload.max=35
ls-refs20058 KiB · hit3 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=3
git.response.bytes=59849
git.response.cache=HIT
git.response.duration_ms=3
git.protocol.version=2
git.pkt.frames=731
git.pkt.data=730
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=59849
git.pkt.payload.max=143
git.ls_refs.count=730
git.ls_refs.head=refs/heads/main
fetchcombine:blob:none+tree:2 · deepen 12004.2 KiB · hit1 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=1
git.response.bytes=4273
git.response.cache=HIT
git.response.duration_ms=1
git.fetch.filter=combine:blob:none+tree:2
git.fetch.wants=0dd7574dce9e385c5c30540e6c15657adc6bdce9
git.fetch.haves.count=0
git.fetch.deepen=1
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=7
git.pkt.data=5
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=4273
git.pkt.payload.max=4173
git.sideband.band1.bytes=4173
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=11
git.pack.bytes=4173
git.fetch.wide.objects=11
git.fetch.wide.extra_bytes=3930
git.fetch.wide.blobs=0
fetchtree:0 · deepen 1020032 KiB · hit2 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=1
git.response.bytes=32926
git.response.cache=HIT
git.response.duration_ms=2
git.fetch.filter=tree:0
git.fetch.wants=0dd7574dce9e385c5c30540e6c15657adc6bdce9
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=22
git.pkt.data=20
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=32926
git.pkt.payload.max=32046
git.sideband.band1.bytes=32046
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=80
git.pack.bytes=32046
git.pack.ofs_delta=36
git.pack.ref_delta=0
git.pack.chain.max=2
git.pack.trailer=cb0bad5d7ffc514895d8b21c4dd470327f90bc91
git.pack.full=44
Open pack map
fetchtree:02001.8 KiB · hit1 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=2
git.response.bytes=1857
git.response.cache=HIT
git.response.duration_ms=1
git.fetch.filter=tree:0
git.fetch.wants=dce174ff8c632a19d17eea99c8a9b7c37fb2b592
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=1857
git.pkt.payload.max=1830
git.sideband.band1.bytes=1830
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=1
git.pack.bytes=1830
git.pack.trailer=fb03183b7909876778f740d196d7516811003517
Open pack map
fetchtree:0200635 B · hit2 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=4
git.response.bytes=635
git.response.cache=HIT
git.response.duration_ms=2
git.fetch.filter=tree:0
git.fetch.wants=517b073a0d5c32bc4e93f86de74b31d60ff8cf03
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=635
git.pkt.payload.max=608
git.sideband.band1.bytes=608
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=1
git.pack.bytes=608
git.pack.trailer=178abb9456d874b7fd38fa21ad5cf9ca3ebcccaa
Open pack map
fetchtree:0200137 B · hit4 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=304
git.response.bytes=137
git.response.cache=HIT
git.response.duration_ms=4
git.fetch.filter=tree:0
git.fetch.wants=4e47711142a3b290b5c9384e7f2ca8e270e94877
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=137
git.pkt.payload.max=110
git.sideband.band1.bytes=110
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=1
git.pack.bytes=110
git.pack.trailer=4a0dd4754cdea3dd8d79d2ff79ba051fab60cf78
Open pack map
fetch2004.3 KiB304 ms
git.upload-pack fetch
http.response.status_code=200
git.response.bytes=4453
git.response.cache=MISS
git.response.duration_ms=304
git.fetch.wants=b6fd3148c918af5a12e69c1c841a14b30d2b1d98
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=4453
git.pkt.payload.max=4426
git.sideband.band1.bytes=4426
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://gitlab.com/gitlab-org/cli
Ref
refs/heads/main
Commit
0dd7574dce9e385c5c30540e6c15657adc6bdce9
cf-ray
a5e2c2f54ed2aedd
Request
5b432f38…
Protocol
v2 · sha1
Agent
git/2.56.g1891de4-Linux
Filter
advertised
Fetch
shallow wait-for-done filter
Capabilities
agent ls-refs fetch server-option object-format