GitLabgitlab-org

cli

main
ply7 git calls201 ms99 KiB5 cachedprotocol v2
79 lines3.4 KiBRaw
1package mr
3import (
4 "github.com/MakeNowJust/heredoc/v2"
5 "github.com/spf13/cobra"
7 "gitlab.com/gitlab-org/cli/internal/cmdutils"
8 mrApproveCmd "gitlab.com/gitlab-org/cli/internal/commands/mr/approve"
9 mrApproversCmd "gitlab.com/gitlab-org/cli/internal/commands/mr/approvers"
10 mrCheckoutCmd "gitlab.com/gitlab-org/cli/internal/commands/mr/checkout"
11 mrCloseCmd "gitlab.com/gitlab-org/cli/internal/commands/mr/close"
12 mrCreateCmd "gitlab.com/gitlab-org/cli/internal/commands/mr/create"
13 mrDeleteCmd "gitlab.com/gitlab-org/cli/internal/commands/mr/delete"
14 mrDiffCmd "gitlab.com/gitlab-org/cli/internal/commands/mr/diff"
15 mrForCmd "gitlab.com/gitlab-org/cli/internal/commands/mr/for"
16 mrIssuesCmd "gitlab.com/gitlab-org/cli/internal/commands/mr/issues"
17 mrListCmd "gitlab.com/gitlab-org/cli/internal/commands/mr/list"
18 mrMergeCmd "gitlab.com/gitlab-org/cli/internal/commands/mr/merge"
19 mrNoteCmd "gitlab.com/gitlab-org/cli/internal/commands/mr/note"
20 mrRebaseCmd "gitlab.com/gitlab-org/cli/internal/commands/mr/rebase"
21 mrReopenCmd "gitlab.com/gitlab-org/cli/internal/commands/mr/reopen"
22 mrRevokeCmd "gitlab.com/gitlab-org/cli/internal/commands/mr/revoke"
23 mrSubscribeCmd "gitlab.com/gitlab-org/cli/internal/commands/mr/subscribe"
24 mrTodoCmd "gitlab.com/gitlab-org/cli/internal/commands/mr/todo"
25 mrUnsubscribeCmd "gitlab.com/gitlab-org/cli/internal/commands/mr/unsubscribe"
26 mrUpdateCmd "gitlab.com/gitlab-org/cli/internal/commands/mr/update"
27 mrViewCmd "gitlab.com/gitlab-org/cli/internal/commands/mr/view"
30func NewCmdMR(f cmdutils.Factory) *cobra.Command {
31 mrCmd := &cobra.Command{
32 Use: "mr <command> [flags]",
33 Short: `Create, view, and manage merge requests.`,
34 Long: heredoc.Docf(`
35 Open a merge request from your current branch, list and view existing
36 merge requests, and manage them: approve, merge, rebase, comment, and
37 more.
39 Use %[1]s--repo%[1]s to target a project other than the current one.
40 `, "`"),
41 Example: heredoc.Doc(`
42 glab mr create --fill --label bugfix
43 glab mr merge 123
44 glab mr note -m "needs to do X before it can be merged" branch-foo`),
45 Annotations: map[string]string{
46 "help:arguments": heredoc.Doc(`
47 Specify a merge request in one of the following formats:
48 - By number, for example "123"
49 - By the name of its source branch, for example "patch-1" or "OWNER:patch-1"
50 - By URL, for example "https://gitlab.com/gitlab-org/cli/-/merge_requests/123"
51 `),
52 },
53 }
55 cmdutils.EnableRepoOverride(mrCmd, f)
57 mrCmd.AddCommand(mrApproveCmd.NewCmdApprove(f))
58 mrCmd.AddCommand(mrApproversCmd.NewCmdApprovers(f))
59 mrCmd.AddCommand(mrCheckoutCmd.NewCmdCheckout(f))
60 mrCmd.AddCommand(mrCloseCmd.NewCmdClose(f))
61 mrCmd.AddCommand(mrCreateCmd.NewCmdCreate(f))
62 mrCmd.AddCommand(mrDeleteCmd.NewCmdDelete(f))
63 mrCmd.AddCommand(mrDiffCmd.NewCmdDiff(f, nil))
64 mrCmd.AddCommand(mrForCmd.NewCmdFor(f))
65 mrCmd.AddCommand(mrIssuesCmd.NewCmdIssues(f))
66 mrCmd.AddCommand(mrListCmd.NewCmdList(f, nil))
67 mrCmd.AddCommand(mrMergeCmd.NewCmdMerge(f))
68 mrCmd.AddCommand(mrNoteCmd.NewCmdNote(f))
69 mrCmd.AddCommand(mrRebaseCmd.NewCmdRebase(f))
70 mrCmd.AddCommand(mrReopenCmd.NewCmdReopen(f))
71 mrCmd.AddCommand(mrRevokeCmd.NewCmdRevoke(f))
72 mrCmd.AddCommand(mrSubscribeCmd.NewCmdSubscribe(f))
73 mrCmd.AddCommand(mrUnsubscribeCmd.NewCmdUnsubscribe(f))
74 mrCmd.AddCommand(mrTodoCmd.NewCmdTodo(f))
75 mrCmd.AddCommand(mrUpdateCmd.NewCmdUpdate(f))
76 mrCmd.AddCommand(mrViewCmd.NewCmdView(f))
78 return mrCmd
Diagnostics7 git calls · 201 ms
CallStatusSizeTime0201 ms
discover200185 B3 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
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 · hit9 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=9
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 · 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=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=1
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:0200746 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=746
git.response.cache=HIT
git.response.duration_ms=3
git.fetch.filter=tree:0
git.fetch.wants=f3d413a22af5a9c2fe9aa49709b1cb36d1351a7f
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=746
git.pkt.payload.max=719
git.sideband.band1.bytes=719
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=1
git.pack.bytes=719
git.pack.trailer=330baf80c59a4208b55120dff7dd824b7952b790
Open pack map
fetch2001.0 KiB186 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=186
git.response.bytes=1050
git.response.cache=MISS
git.response.duration_ms=186
git.fetch.wants=698a0c9e8613cde9d9f90976c548ae80c7e7e13f
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=1050
git.pkt.payload.max=1023
git.sideband.band1.bytes=1023
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
a5e2c4bbced4aedd
Request
24d8c755…
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