GitLabgitlab-org
cli
main
1package list
3import (
4 "errors"
5 "fmt"
6 "net/url"
7 "strconv"
8 "strings"
9 "time"
11 "github.com/MakeNowJust/heredoc/v2"
12 "github.com/spf13/cobra"
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/cmdutils"
18 "gitlab.com/gitlab-org/cli/internal/commands/issuable"
19 "gitlab.com/gitlab-org/cli/internal/commands/issue/issueutils"
20 "gitlab.com/gitlab-org/cli/internal/glrepo"
21 "gitlab.com/gitlab-org/cli/internal/iostreams"
22 "gitlab.com/gitlab-org/cli/internal/mcpannotations"
23 "gitlab.com/gitlab-org/cli/internal/utils"
24)
26type ListOptions struct {
27 // metadata
28 Assignee string
29 NotAssignee string
30 Author string
31 NotAuthor string
32 Labels []string
33 NotLabels []string
34 Milestone string
35 Mine bool
36 Search string
37 Group string
38 Epic int
39 IssueType string
40 Iteration int
42 // issue states
43 State string
44 Closed bool
45 Opened bool
46 All bool
47 Confidential bool
49 // dates
50 CreatedAfter time.Time
51 CreatedBefore time.Time
52 UpdatedAfter time.Time
53 UpdatedBefore time.Time
55 // Pagination
56 Page int64
57 PerPage int64
59 // Other
60 In string
62 // display opts
63 ListType string
64 TitleQualifier string
65 OutputFormat string
66 Output string
67 OrderBy string
68 Sort string
70 IO *iostreams.IOStreams
71 BaseRepo func() (glrepo.Interface, error)
72 apiClient func(repoHost string) (*api.Client, error)
74 JSONOutput bool
75}
77func NewCmdList(f cmdutils.Factory, runE func(opts *ListOptions) error, issueType issuable.IssueType) *cobra.Command {
78 opts := &ListOptions{
79 IO: f.IO(),
80 BaseRepo: f.BaseRepo,
81 apiClient: f.ApiClient,
82 IssueType: string(issueType),
83 }
85 issueListCmd := &cobra.Command{
86 Use: "list [flags]",
87 Short: fmt.Sprintf(`List project %ss.`, issueType),
88 Long: heredoc.Docf(`
89 Defaults to open items. Use %[1]s--group%[1]s to list for a group
90 instead of the current project.
91 `, "`"),
92 Aliases: []string{"ls"},
93 Example: heredoc.Doc(fmt.Sprintf(`
94 glab %[1]s list --all
95 glab %[1]s ls --all
96 glab %[1]s list --assignee=@me
97 glab %[1]s list --milestone release-2.0.0
98 glab %[1]s list --updated-after 2026-10-01T00:00:00Z`, issueType)),
99 Args: cobra.NoArgs,
100 ValidArgsFunction: cobra.NoFileCompletions,
101 Annotations: map[string]string{
102 mcpannotations.Safe: "true",
103 },
104 RunE: func(cmd *cobra.Command, args []string) error {
105 if opts.Author != "" && opts.NotAuthor != "" {
106 return cmdutils.FlagError{
107 Err: errors.New("flags --author and --not-author are mutually exclusive"),
108 }
109 }
111 if opts.Assignee != "" && opts.NotAssignee != "" {
112 return cmdutils.FlagError{
113 Err: errors.New("flags --assignee and --not-assignee are mutually exclusive"),
114 }
115 }
117 switch {
118 case opts.All:
119 opts.State = "all"
120 case opts.Closed:
121 opts.State = "closed"
122 opts.TitleQualifier = "closed"
123 default:
124 opts.State = "opened"
125 opts.TitleQualifier = "open"
126 }
128 group, err := cmdutils.GroupOverride(cmd)
129 if err != nil {
130 return err
131 }
132 opts.Group = group
134 if opts.Epic != 0 && opts.Group == "" {
135 repo, err := opts.BaseRepo()
136 if err != nil {
137 return err
138 }
139 opts.Group = repo.RepoOwner()
140 }
141 if opts.Epic != 0 && opts.Group == "" {
142 return cmdutils.FlagError{
143 Err: errors.New("flag --epic requires flag --group"),
144 }
145 }
147 // The underlying API, ListEpicIssues, does not support filtering, so we do the filtering client-side.
148 // That means to implement pagination, we'd still need to request all previous issues and filter them.
149 // That means client side pagination is more expensive (O(n^2)) than requesting all issues belonging to an epic (O(n)).
150 if opts.Epic != 0 && opts.Page > 1 {
151 return cmdutils.FlagError{
152 Err: errors.New("--epic does not support the --page flag"),
153 }
154 }
156 if runE != nil {
157 return runE(opts)
158 }
160 return listRun(opts)
161 },
162 }
163 cmdutils.EnableRepoOverride(issueListCmd, f)
164 issueListCmd.Flags().StringVarP(&opts.Assignee, "assignee", "a", "", fmt.Sprintf("Filter %s by assignee <username>, @me, @none (unassigned), or @any (assigned).", issueType))
165 issueListCmd.Flags().StringVar(&opts.NotAssignee, "not-assignee", "", fmt.Sprintf("Filter %s by not being assigned to <username>.", issueType))
166 issueListCmd.Flags().StringVar(&opts.Author, "author", "", fmt.Sprintf("Filter %s by author <username>.", issueType))
167 issueListCmd.Flags().StringVar(&opts.NotAuthor, "not-author", "", fmt.Sprintf("Filter %s by not being by author(s) <username>.", issueType))
168 issueListCmd.Flags().StringVar(&opts.Search, "search", "", "Search <string> in the fields defined by '--in'.")
169 issueListCmd.Flags().StringVar(&opts.In, "in", "title,description", "Search in: title, description.")
170 issueListCmd.Flags().StringSliceVarP(&opts.Labels, "label", "l", []string{}, fmt.Sprintf("Filter %s by label <name>. Multiple labels can be comma-separated or specified by repeating the flag.", issueType))
171 issueListCmd.Flags().StringSliceVar(&opts.NotLabels, "not-label", []string{}, fmt.Sprintf("Filter %s by lack of label <name>. Multiple labels can be comma-separated or specified by repeating the flag.", issueType))
172 issueListCmd.Flags().StringVarP(&opts.Milestone, "milestone", "m", "", fmt.Sprintf("Filter %s by milestone <title>.", issueType))
173 issueListCmd.Flags().BoolVarP(&opts.All, "all", "A", false, fmt.Sprintf("Get all %ss.", issueType))
174 issueListCmd.Flags().BoolVarP(&opts.Closed, "closed", "c", false, fmt.Sprintf("Get only closed %ss.", issueType))
175 issueListCmd.Flags().BoolVarP(&opts.Confidential, "confidential", "C", false, fmt.Sprintf("Filter by confidential %ss.", issueType))
176 issueListCmd.Flags().TimeVar(&opts.CreatedAfter, "created-after", time.Time{}, []string{time.RFC3339}, fmt.Sprintf("Filter %ss created after a certain date (RFC 3339, for example 2026-10-01T00:00:00Z).", issueType))
177 issueListCmd.Flags().TimeVar(&opts.CreatedBefore, "created-before", time.Time{}, []string{time.RFC3339}, fmt.Sprintf("Filter %ss created before a certain date (RFC 3339, for example 2026-10-01T00:00:00Z).", issueType))
178 issueListCmd.Flags().TimeVar(&opts.UpdatedAfter, "updated-after", time.Time{}, []string{time.RFC3339}, fmt.Sprintf("Filter %ss updated after a certain date (RFC 3339, for example 2026-10-01T00:00:00Z).", issueType))
179 issueListCmd.Flags().TimeVar(&opts.UpdatedBefore, "updated-before", time.Time{}, []string{time.RFC3339}, fmt.Sprintf("Filter %ss updated before a certain date (RFC 3339, for example 2026-10-01T00:00:00Z).", issueType))
180 issueListCmd.Flags().VarP(cmdutils.NewEnumValue([]string{"details", "ids", "urls"}, "details", &opts.OutputFormat), "output-format", "F", "Options: 'details', 'ids', 'urls'.")
181 cmdutils.EnableJSONOutputP(issueListCmd, f.IO(), &opts.Output, "O", "Options: 'text' or 'json'.")
182 issueListCmd.Flags().Int64VarP(&opts.Page, "page", "p", 1, "Page number.")
183 issueListCmd.Flags().Int64VarP(&opts.PerPage, "per-page", "P", 30, "Number of items to list per page.")
184 issueListCmd.PersistentFlags().StringP("group", "g", "", "Select a group or subgroup. Ignored if a repo argument is set.")
185 issueListCmd.Flags().IntVarP(&opts.Epic, "epic", "e", 0, "List issues belonging to a given epic (requires --group, no pagination support).")
186 issueListCmd.MarkFlagsMutuallyExclusive("output", "output-format")
187 issueListCmd.Flags().StringVar(&opts.OrderBy, "order", "created_at", fmt.Sprintf("Order %s by <field>. Order options: created_at, updated_at, priority, due_date, relative_position, label_priority, milestone_due, popularity, weight.", issueType))
188 issueListCmd.Flags().StringVarP(&opts.Sort, "sort", "s", "desc", "Sort direction for --order field: asc or desc.")
190 if issueType == issuable.TypeIssue {
191 issueListCmd.Flags().StringVarP(&opts.IssueType, "issue-type", "t", "", "Filter issue by its type. Options: issue, incident, test_case.")
192 issueListCmd.Flags().IntVarP(&opts.Iteration, "iteration", "i", 0, "Filter issue by iteration <id>.")
193 }
195 issueListCmd.Flags().BoolP("opened", "o", false, fmt.Sprintf("Get only open %ss.", issueType))
196 _ = issueListCmd.Flags().MarkHidden("opened")
197 _ = issueListCmd.Flags().MarkDeprecated("opened", "default if --closed is not used.")
199 issueListCmd.Flags().BoolVarP(&opts.Mine, "mine", "M", false, fmt.Sprintf("Filter only %ss assigned to me.", issueType))
200 _ = issueListCmd.Flags().MarkHidden("mine")
201 _ = issueListCmd.Flags().MarkDeprecated("mine", "use --assignee=@me")
203 return issueListCmd
204}
206func listRun(opts *ListOptions) error {
207 // NOTE: this command can not only be used for projects,
208 // so we have to manually check for the base repo, if it doesn't exist,
209 // we bootstrap the client with the default hostname.
210 var repoHost string
211 if baseRepo, err := opts.BaseRepo(); err == nil {
212 repoHost = baseRepo.RepoHost()
213 }
214 apiClient, err := opts.apiClient(repoHost)
215 if err != nil {
216 return err
217 }
218 client := apiClient.Lab()
220 listOpts := &gitlab.ListProjectIssuesOptions{
221 State: new(opts.State),
222 In: new(opts.In),
223 OrderBy: new(opts.OrderBy),
224 Sort: new(opts.Sort),
225 }
226 listOpts.Page = 1
227 listOpts.PerPage = 30
229 if opts.Assignee == "" && opts.Mine {
230 opts.Assignee = "@me"
231 }
233 if opts.Assignee != "" {
234 switch opts.Assignee {
235 case "@none":
236 listOpts.AssigneeID = gitlab.AssigneeID(gitlab.UserIDNone)
237 case "@any":
238 listOpts.AssigneeID = gitlab.AssigneeID(gitlab.UserIDAny)
239 default:
240 uid, err := userID(client, opts.Assignee)
241 if err != nil {
242 return err
243 }
244 listOpts.AssigneeID = gitlab.AssigneeID(uid)
245 }
246 }
248 if opts.NotAssignee != "" {
249 uid, err := userID(client, opts.NotAssignee)
250 if err != nil {
251 return err
252 }
253 listOpts.NotAssigneeID = new(uid)
254 }
256 if opts.Author != "" {
257 uid, err := userID(client, opts.Author)
258 if err != nil {
259 return err
260 }
261 listOpts.AuthorID = new(uid)
262 }
264 if opts.NotAuthor != "" {
265 uid, err := userID(client, opts.NotAuthor)
266 if err != nil {
267 return err
268 }
269 listOpts.NotAuthorID = new(uid)
270 }
272 if opts.Search != "" {
273 listOpts.Search = new(opts.Search)
274 opts.ListType = "search"
275 }
276 if len(opts.Labels) != 0 {
277 listOpts.Labels = (*gitlab.LabelOptions)(&opts.Labels)
278 opts.ListType = "search"
279 }
280 if len(opts.NotLabels) != 0 {
281 listOpts.NotLabels = (*gitlab.LabelOptions)(&opts.NotLabels)
282 opts.ListType = "search"
283 }
284 if opts.Milestone != "" {
285 listOpts.Milestone = new(opts.Milestone)
286 opts.ListType = "search"
287 }
288 if opts.Confidential {
289 listOpts.Confidential = new(opts.Confidential)
290 opts.ListType = "search"
291 }
292 if !opts.CreatedAfter.IsZero() {
293 listOpts.CreatedAfter = new(opts.CreatedAfter)
294 opts.ListType = "search"
295 }
296 if !opts.CreatedBefore.IsZero() {
297 listOpts.CreatedBefore = new(opts.CreatedBefore)
298 opts.ListType = "search"
299 }
300 if !opts.UpdatedAfter.IsZero() {
301 listOpts.UpdatedAfter = new(opts.UpdatedAfter)
302 opts.ListType = "search"
303 }
304 if !opts.UpdatedBefore.IsZero() {
305 listOpts.UpdatedBefore = new(opts.UpdatedBefore)
306 opts.ListType = "search"
307 }
308 if opts.Page != 0 {
309 listOpts.Page = opts.Page
310 opts.ListType = "search"
311 }
312 if opts.PerPage != 0 {
313 listOpts.PerPage = opts.PerPage
314 opts.ListType = "search"
315 } else {
316 listOpts.PerPage = api.DefaultListLimit
317 }
319 issueType := "issue"
320 if opts.IssueType != "" {
321 listOpts.IssueType = new(opts.IssueType)
322 opts.ListType = "search"
323 issueType = opts.IssueType
324 }
325 if issueType == "issue" && opts.Iteration != 0 {
326 listOpts.IterationID = new(int64(opts.Iteration))
327 }
329 var issues []*gitlab.Issue
330 var resp *gitlab.Response
331 title := utils.NewListTitle(fmt.Sprintf("%s %s", opts.TitleQualifier, issueType))
332 switch {
333 case opts.Epic != 0:
334 issues, err = listEpicIssues(client, opts, listOpts)
335 if err != nil {
336 return err
337 }
338 title.RepoName = fmt.Sprintf("%s&%d", opts.Group, opts.Epic)
340 case opts.Group != "":
341 issues, resp, err = client.Issues.ListGroupIssues(opts.Group, projectListIssueOptionsToGroup(listOpts))
342 if err != nil {
343 return err
344 }
345 title.RepoName = opts.Group
347 default:
348 repo, err := opts.BaseRepo()
349 if err != nil {
350 return err
351 }
353 issues, resp, err = client.Issues.ListProjectIssues(repo.FullName(), listOpts)
354 if err != nil {
355 return err
356 }
357 title.RepoName = repo.FullName()
358 }
360 title.Page = int(listOpts.Page)
361 title.ListActionType = opts.ListType
362 title.CurrentPageTotal = len(issues)
363 // Epic issues are filtered client-side, so they have no total that matches the rows shown.
364 if resp != nil {
365 title.Total = int(resp.TotalItems)
366 }
368 if opts.Output == "json" {
369 return opts.IO.PrintJSON(issues)
370 }
372 if opts.OutputFormat == "ids" {
373 for _, i := range issues {
374 opts.IO.LogInfof("%d\n", i.IID)
375 }
376 return nil
377 }
379 if opts.OutputFormat == "urls" {
380 for _, i := range issues {
381 opts.IO.LogInfof("%s\n", i.WebURL)
382 }
383 return nil
384 }
386 if opts.IO.StartPager() != nil {
387 return fmt.Errorf("failed to start pager: %w", err)
388 }
389 defer opts.IO.StopPager()
391 opts.IO.LogInfof("%s\n%s\n", title.Describe(), issueutils.DisplayIssueList(opts.IO, issues, title.RepoName))
392 return nil
393}
395func userID(client *gitlab.Client, username string) (int64, error) {
396 if username == "@me" {
397 me, _, err := client.Users.CurrentUser()
398 if err != nil {
399 return 0, err
400 }
401 return me.ID, nil
402 }
404 u, err := api.UserByName(client, username)
405 if err != nil {
406 return 0, err
407 }
408 return u.ID, nil
409}
411// listEpicIssues is a wrapper around the API call of the same name.
412// Since the GitLab API doesn't support filtering for this method, it implements client-side filtering of issues instead.
413func listEpicIssues(client *gitlab.Client, opts *ListOptions, projListOpts *gitlab.ListProjectIssuesOptions) ([]*gitlab.Issue, error) {
414 var (
415 listOpts = gitlab.ListOptions{
416 Page: 1,
417 }
418 issues []*gitlab.Issue
419 )
421 maxIssues := opts.PerPage
422 if maxIssues <= 0 {
423 maxIssues = api.DefaultListLimit
424 }
426 listOpts.PerPage = min(maxIssues, api.MaxPerPage)
428 for {
429 is, req, err := client.EpicIssues.ListEpicIssues(opts.Group, int64(opts.Epic), &listOpts)
430 if err != nil {
431 return nil, err
432 }
434 // The "list issues for an epic" api doesn't support filtering, requiring client-side filtering.
435 is = filterIssues(is, projListOpts)
437 // If the number of issues exceeds the page size, trim the list.
438 if len(issues)+len(is) > int(maxIssues) {
439 is = is[:int(maxIssues)-len(issues)]
440 }
442 issues = append(issues, is...)
444 if len(issues) >= int(maxIssues) || req.NextPage == 0 {
445 break
446 }
448 listOpts.Page = req.NextPage
449 }
451 return issues, nil
452}
454func filterIssues(issues []*gitlab.Issue, opts *gitlab.ListProjectIssuesOptions) []*gitlab.Issue {
455 var ret []*gitlab.Issue
457 for _, issue := range issues {
458 if isMatch(issue, opts) {
459 ret = append(ret, issue)
460 }
461 }
463 return ret
464}
466func isMatch(issue *gitlab.Issue, opts *gitlab.ListProjectIssuesOptions) bool {
467 if opts.AssigneeID != nil && !hasAssignee(issue, opts.AssigneeID) {
468 return false
469 }
470 if opts.NotAssigneeID != nil {
471 notAssigneeIDValue := gitlab.AssigneeID(*opts.NotAssigneeID)
472 if hasAssignee(issue, notAssigneeIDValue) {
473 return false
474 }
475 }
476 if opts.AuthorID != nil && (issue.Author == nil || issue.Author.ID != *opts.AuthorID) {
477 return false
478 }
479 if opts.NotAuthorID != nil && issue.Author != nil && issue.Author.ID == *opts.NotAuthorID {
480 return false
481 }
482 if opts.Milestone != nil && (issue.Milestone == nil || !strings.EqualFold(issue.Milestone.Title, *opts.Milestone)) {
483 return false
484 }
485 if opts.Search != nil && !strings.Contains(strings.ToLower(issue.Title), strings.ToLower(*opts.Search)) {
486 return false
487 }
488 if opts.IterationID != nil && (issue.Iteration == nil || issue.Iteration.ID != *opts.IterationID) {
489 return false
490 }
492 if !stateMatches(issue, opts) {
493 return false
494 }
495 if opts.Confidential != nil && *opts.Confidential != issue.Confidential {
496 return false
497 }
498 if opts.CreatedAfter != nil && (issue.CreatedAt == nil || issue.CreatedAt.Before(*opts.CreatedAfter)) {
499 return false
500 }
501 if opts.CreatedBefore != nil && (issue.CreatedAt == nil || issue.CreatedAt.After(*opts.CreatedBefore)) {
502 return false
503 }
504 if opts.UpdatedAfter != nil && (issue.UpdatedAt == nil || issue.UpdatedAt.Before(*opts.UpdatedAfter)) {
505 return false
506 }
507 if opts.UpdatedBefore != nil && (issue.UpdatedAt == nil || issue.UpdatedAt.After(*opts.UpdatedBefore)) {
508 return false
509 }
511 return true
512}
514func hasAssignee(issue *gitlab.Issue, userID *gitlab.AssigneeIDValue) bool {
515 // NOTE: this is just a hack to get back the assignee ID value
516 v := url.Values{}
517 if err := userID.EncodeValues("dummy", &v); err != nil {
518 return false
519 }
520 switch v.Get("dummy") {
521 case string(gitlab.UserIDNone):
522 return len(issue.Assignees) == 0
523 case string(gitlab.UserIDAny):
524 return len(issue.Assignees) > 0
525 }
526 targetID, err := strconv.ParseInt(v.Get("dummy"), 10, 64)
527 if err != nil {
528 return false
529 }
531 for _, assignee := range issue.Assignees {
532 if assignee.ID == targetID {
533 return true
534 }
535 }
537 return false
538}
540func stateMatches(issue *gitlab.Issue, opts *gitlab.ListProjectIssuesOptions) bool {
541 switch {
542 case opts.State == nil:
543 return true
544 case *opts.State == "all":
545 return true
546 default:
547 return *opts.State == issue.State
548 }
549}
551func projectListIssueOptionsToGroup(l *gitlab.ListProjectIssuesOptions) *gitlab.ListGroupIssuesOptions {
552 return &gitlab.ListGroupIssuesOptions{
553 ListOptions: l.ListOptions,
554 State: l.State,
555 Labels: l.Labels,
556 NotLabels: l.NotLabels,
557 WithLabelDetails: l.WithLabelDetails,
558 IIDs: l.IIDs,
559 Milestone: l.Milestone,
560 Scope: l.Scope,
561 AuthorID: l.AuthorID,
562 NotAuthorID: l.NotAuthorID,
563 AssigneeID: l.AssigneeID,
564 NotAssigneeID: l.NotAssigneeID,
565 AssigneeUsername: l.AssigneeUsername,
566 MyReactionEmoji: l.MyReactionEmoji,
567 NotMyReactionEmoji: l.NotMyReactionEmoji,
568 OrderBy: l.OrderBy,
569 Sort: l.Sort,
570 Search: l.Search,
571 In: l.In,
572 CreatedAfter: l.CreatedAfter,
573 CreatedBefore: l.CreatedBefore,
574 UpdatedAfter: l.UpdatedAfter,
575 UpdatedBefore: l.UpdatedBefore,
576 IssueType: l.IssueType,
577 Confidential: l.Confidential,
578 IterationID: l.IterationID,
579 }
580}
Diagnostics8 git calls · 244 ms
CallStatusSizeTime0244 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=3 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 · hit2 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=4273 git.response.cache=HIT git.response.duration_ms=2 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 · hit3 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=3 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=44Open 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=3 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=fb03183b7909876778f740d196d7516811003517Open pack map
fetchtree:0200347 B · hit3 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=3 git.response.bytes=347 git.response.cache=HIT git.response.duration_ms=3 git.fetch.filter=tree:0 git.fetch.wants=73f6a798386c4a4df64da0b5349881ded38885ca 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=347 git.pkt.payload.max=320 git.sideband.band1.bytes=320 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=1 git.pack.bytes=320 git.pack.trailer=93ed36ed1884d41429801c50b3bb5d32ef1307a5Open pack map
fetchtree:0200209 B · hit3 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=231 git.response.bytes=209 git.response.cache=HIT git.response.duration_ms=3 git.fetch.filter=tree:0 git.fetch.wants=135b8c60872264a89b3665cc28cad86b62fd614c 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=209 git.pkt.payload.max=182 git.sideband.band1.bytes=182 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=1 git.pack.bytes=182 git.pack.trailer=73ae1ae228d92d2d7cfa420b9d05651ed87abc5bOpen pack map
fetch2005.0 KiB231 ms
git.upload-pack fetch http.response.status_code=200 git.response.bytes=5142 git.response.cache=MISS git.response.duration_ms=231 git.fetch.wants=52468aed811ea3b3ae7f75deb98d1ebdd8642dbc 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=5142 git.pkt.payload.max=5115 git.sideband.band1.bytes=5115 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
- a5e2fb45ca13cf81
- Request
- 08d80959…
- 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