{
    "mode": "man",
    "parameter": "gitprotocol-capabilities",
    "section": "5",
    "url": "https://www.chedong.com/phpMan.php/man/gitprotocol-capabilities/5/json",
    "generated": "2026-11-08T13:33:15Z",
    "synopsis": "<over-the-wire-protocol>",
    "sections": {
        "NAME": {
            "content": "gitprotocol-capabilities - Protocol v0 and v1 capabilities\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "<over-the-wire-protocol>\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Note\n\nthis document describes capabilities for versions 0 and 1 of the pack protocol. For\nversion 2, please refer to the gitprotocol-v2(5) doc.\n\nServers SHOULD support all capabilities defined in this document.\n\nOn the very first line of the initial server response of either receive-pack and upload-pack\nthe first reference is followed by a NUL byte and then a list of space delimited server\ncapabilities. These allow the server to declare what it can and cannot support to the client.\n\nClient will then send a space separated list of capabilities it wants to be in effect. The\nclient MUST NOT ask for capabilities the server did not say it supports.\n\nServer MUST diagnose and abort if capabilities it does not understand were sent. Server MUST\nNOT ignore capabilities that client requested and server advertised. As a consequence of\nthese rules, server MUST NOT advertise capabilities it does not understand.\n\nThe atomic, report-status, report-status-v2, delete-refs, quiet, and push-cert capabilities\nare sent and recognized by the receive-pack (push to server) process.\n\nThe ofs-delta and side-band-64k capabilities are sent and recognized by both upload-pack and\nreceive-pack protocols. The agent and session-id capabilities may optionally be sent in both\nprotocols.\n\nAll other capabilities are only recognized by the upload-pack (fetch from server) process.\n",
            "subsections": []
        },
        "MULTIACK": {
            "content": "The multiack capability allows the server to return \"ACK obj-id continue\" as soon as it\nfinds a commit that it can use as a common base, between the client’s wants and the client’s\nhave set.\n\nBy sending this early, the server can potentially head off the client from walking any\nfurther down that particular branch of the client’s repository history. The client may still\nneed to walk down other branches, sending have lines for those, until the server has a\ncomplete cut across the DAG, or the client has said \"done\".\n\nWithout multiack, a client sends have lines in --date-order until the server has found a\ncommon base. That means the client will send have lines that are already known by the server\nto be common, because they overlap in time with another branch on which the server hasn’t\nfound a common base yet.\n\nFor example suppose the client has commits in caps that the server doesn’t and the server has\ncommits in lower case that the client doesn’t, as in the following diagram:\n\n+---- u ---------------------- x\n/              +----- y\n/              /\na -- b -- c -- d -- E -- F\n\\\n+--- Q -- R -- S\n\nIf the client wants x,y and starts out by saying have F,S, the server doesn’t know what F,S\nis. Eventually the client says \"have d\" and the server sends \"ACK d continue\" to let the\nclient know to stop walking down that line (so don’t send c-b-a), but it’s not done yet, it\nneeds a base for x. The client keeps going with S-R-Q, until a gets reached, at which point\nthe server has a clear base and it all ends.\n\nWithout multiack the client would have sent that c-b-a chain anyway, interleaved with S-R-Q.\n",
            "subsections": []
        },
        "MULTIACKDETAILED": {
            "content": "This is an extension of multiack that permits the client to better understand the server’s\nin-memory state. See gitprotocol-pack(5), section \"Packfile Negotiation\" for more\ninformation.\n",
            "subsections": []
        },
        "NO-DONE": {
            "content": "This capability should only be used with the smart HTTP protocol. If multiackdetailed and\nno-done are both present, then the sender is free to immediately send a pack following its\nfirst \"ACK obj-id ready\" message.\n\nWithout no-done in the smart HTTP protocol, the server session would end and the client has\nto make another trip to send \"done\" before the server can send the pack. no-done removes the\nlast round and thus slightly reduces latency.\n",
            "subsections": []
        },
        "THIN-PACK": {
            "content": "A thin pack is one with deltas which reference base objects not contained within the pack\n(but are known to exist at the receiving end). This can reduce the network traffic\nsignificantly, but it requires the receiving end to know how to \"thicken\" these packs by\nadding the missing bases to the pack.\n\nThe upload-pack server advertises thin-pack when it can generate and send a thin pack. A\nclient requests the thin-pack capability when it understands how to \"thicken\" it, notifying\nthe server that it can receive such a pack. A client MUST NOT request the thin-pack\ncapability if it cannot turn a thin pack into a self-contained pack.\n\nReceive-pack, on the other hand, is assumed by default to be able to handle thin packs, but\ncan ask the client not to use the feature by advertising the no-thin capability. A client\nMUST NOT send a thin pack if the server advertises the no-thin capability.\n\nThe reasons for this asymmetry are historical. The receive-pack program did not exist until\nafter the invention of thin packs, so historically the reference implementation of\nreceive-pack always understood thin packs. Adding no-thin later allowed receive-pack to\ndisable the feature in a backwards-compatible manner.\n\nSIDE-BAND, SIDE-BAND-64K\nThis capability means that the server can send, and the client can understand, multiplexed\nprogress reports and error info interleaved with the packfile itself.\n\nThese two options are mutually exclusive. A modern client always favors side-band-64k.\n\nEither mode indicates that the packfile data will be streamed broken up into packets of up to\neither 1000 bytes in the case of sideband, or 65520 bytes in the case of sideband64k. Each\npacket is made up of a leading 4-byte pkt-line length of how much data is in the packet,\nfollowed by a 1-byte stream code, followed by the actual data.\n\nThe stream code can be one of:\n\n1 - pack data\n2 - progress messages\n3 - fatal error message just before stream aborts\n\nThe \"side-band-64k\" capability came about as a way for newer clients that can handle much\nlarger packets to request packets that are actually crammed nearly full, while maintaining\nbackward compatibility for the older clients.\n\nFurther, with side-band and its up to 1000-byte messages, it’s actually 999 bytes of payload\nand 1 byte for the stream code. With side-band-64k, same deal, you have up to 65519 bytes of\ndata and 1 byte for the stream code.\n\nThe client MUST send only one of \"side-band\" and \"side- band-64k\". The server MUST diagnose\nit as an error if client requests both.\n",
            "subsections": []
        },
        "OFS-DELTA": {
            "content": "The server can send, and the client can understand, PACKv2 with delta referring to its base\nby position in pack rather than by an obj-id. That is, they can send/read OBJOFSDELTA (aka\ntype 6) in a packfile.\n",
            "subsections": []
        },
        "AGENT": {
            "content": "The server may optionally send a capability of the form agent=X to notify the client that the\nserver is running version X. The client may optionally return its own agent string by\nresponding with an agent=Y capability (but it MUST NOT do so if the server did not mention\nthe agent capability). The X and Y strings may contain any printable ASCII characters except\nspace (i.e., the byte range 32 < x < 127), and are typically of the form \"package/version\"\n(e.g., \"git/1.8.3.1\"). The agent strings are purely informative for statistics and debugging\npurposes, and MUST NOT be used to programmatically assume the presence or absence of\nparticular features.\n",
            "subsections": []
        },
        "OBJECT-FORMAT": {
            "content": "This capability, which takes a hash algorithm as an argument, indicates that the server\nsupports the given hash algorithms. It may be sent multiple times; if so, the first one given\nis the one used in the ref advertisement.\n\nWhen provided by the client, this indicates that it intends to use the given hash algorithm\nto communicate. The algorithm provided must be one that the server supports.\n\nIf this capability is not provided, it is assumed that the only supported algorithm is SHA-1.\n",
            "subsections": []
        },
        "SYMREF": {
            "content": "This parameterized capability is used to inform the receiver which symbolic ref points to\nwhich ref; for example, \"symref=HEAD:refs/heads/master\" tells the receiver that HEAD points\nto master. This capability can be repeated to represent multiple symrefs.\n\nServers SHOULD include this capability for the HEAD symref if it is one of the refs being\nsent.\n\nClients MAY use the parameters from this capability to select the proper initial branch when\ncloning a repository.\n",
            "subsections": []
        },
        "SHALLOW": {
            "content": "This capability adds \"deepen\", \"shallow\" and \"unshallow\" commands to the\nfetch-pack/upload-pack protocol so clients can request shallow clones.\n",
            "subsections": []
        },
        "DEEPEN-SINCE": {
            "content": "This capability adds \"deepen-since\" command to fetch-pack/upload-pack protocol so the client\ncan request shallow clones that are cut at a specific time, instead of depth. Internally it’s\nequivalent of doing \"rev-list --max-age=<timestamp>\" on the server side. \"deepen-since\"\ncannot be used with \"deepen\".\n",
            "subsections": []
        },
        "DEEPEN-NOT": {
            "content": "This capability adds \"deepen-not\" command to fetch-pack/upload-pack protocol so the client\ncan request shallow clones that are cut at a specific revision, instead of depth. Internally\nit’s equivalent of doing \"rev-list --not <rev>\" on the server side. \"deepen-not\" cannot be\nused with \"deepen\", but can be used with \"deepen-since\".\n",
            "subsections": []
        },
        "DEEPEN-RELATIVE": {
            "content": "If this capability is requested by the client, the semantics of \"deepen\" command is changed.\nThe \"depth\" argument is the depth from the current shallow boundary, instead of the depth\nfrom remote refs.\n",
            "subsections": []
        },
        "NO-PROGRESS": {
            "content": "The client was started with \"git clone -q\" or something similar, and doesn’t want that side\nband 2. Basically the client just says \"I do not wish to receive stream 2 on sideband, so do\nnot send it to me, and if you did, I will drop it on the floor anyway\". However, the sideband\nchannel 3 is still used for error responses.\n",
            "subsections": []
        },
        "INCLUDE-TAG": {
            "content": "The include-tag capability is about sending annotated tags if we are sending objects they\npoint to. If we pack an object to the client, and a tag object points exactly at that object,\nwe pack the tag object too. In general this allows a client to get all new annotated tags\nwhen it fetches a branch, in a single network connection.\n\nClients MAY always send include-tag, hardcoding it into a request when the server advertises\nthis capability. The decision for a client to request include-tag only has to do with the\nclient’s desires for tag data, whether or not a server had advertised objects in the\nrefs/tags/* namespace.\n\nServers MUST pack the tags if their referent is packed and the client has requested\ninclude-tags.\n\nClients MUST be prepared for the case where a server has ignored include-tag and has not\nactually sent tags in the pack. In such cases the client SHOULD issue a subsequent fetch to\nacquire the tags that include-tag would have otherwise given the client.\n\nThe server SHOULD send include-tag, if it supports it, regardless of whether or not there are\ntags available.\n",
            "subsections": []
        },
        "REPORT-STATUS": {
            "content": "The receive-pack process can receive a report-status capability, which tells it that the\nclient wants a report of what happened after a packfile upload and reference update. If the\npushing client requests this capability, after unpacking and updating references the server\nwill respond with whether the packfile unpacked successfully and if each reference was\nupdated successfully. If any of those were not successful, it will send back an error\nmessage. See gitprotocol-pack(5) for example messages.\n",
            "subsections": []
        },
        "REPORT-STATUS-V2": {
            "content": "Capability report-status-v2 extends capability report-status by adding new \"option\"\ndirectives in order to support reference rewritten by the \"proc-receive\" hook. The\n\"proc-receive\" hook may handle a command for a pseudo-reference which may create or update a\nreference with different name, new-oid, and old-oid. While the capability report-status\ncannot report for such case. See gitprotocol-pack(5) for details.\n",
            "subsections": []
        },
        "DELETE-REFS": {
            "content": "If the server sends back the delete-refs capability, it means that it is capable of accepting\na zero-id value as the target value of a reference update. It is not sent back by the client,\nit simply informs the client that it can be sent zero-id values to delete references.\n",
            "subsections": []
        },
        "QUIET": {
            "content": "If the receive-pack server advertises the quiet capability, it is capable of silencing\nhuman-readable progress output which otherwise may be shown when processing the received\npack. A send-pack client should respond with the quiet capability to suppress server-side\nprogress reporting if the local progress reporting is also being suppressed (e.g., via push",
            "subsections": [
                {
                    "name": "-q",
                    "content": "",
                    "flag": "-q"
                }
            ]
        },
        "ATOMIC": {
            "content": "If the server sends the atomic capability it is capable of accepting atomic pushes. If the\npushing client requests this capability, the server will update the refs in one atomic\ntransaction. Either all refs are updated or none.\n",
            "subsections": []
        },
        "PUSH-OPTIONS": {
            "content": "If the server sends the push-options capability it is able to accept push options after the\nupdate commands have been sent, but before the packfile is streamed. If the pushing client\nrequests this capability, the server will pass the options to the pre- and post- receive\nhooks that process this push request.\n",
            "subsections": []
        },
        "ALLOW-TIP-SHA1-IN-WANT": {
            "content": "If the upload-pack server advertises this capability, fetch-pack may send \"want\" lines with\nobject names that exist at the server but are not advertised by upload-pack. For historical\nreasons, the name of this capability contains \"sha1\". Object names are always given using the\nobject format negotiated through the object-format capability.\n",
            "subsections": []
        },
        "ALLOW-REACHABLE-SHA1-IN-WANT": {
            "content": "If the upload-pack server advertises this capability, fetch-pack may send \"want\" lines with\nobject names that exist at the server but are not advertised by upload-pack. For historical\nreasons, the name of this capability contains \"sha1\". Object names are always given using the\nobject format negotiated through the object-format capability.\n\nPUSH-CERT=<NONCE>\nThe receive-pack server that advertises this capability is willing to accept a signed push\ncertificate, and asks the <nonce> to be included in the push certificate. A send-pack client\nMUST NOT send a push-cert packet unless the receive-pack server advertises this capability.\n",
            "subsections": []
        },
        "FILTER": {
            "content": "If the upload-pack server advertises the filter capability, fetch-pack may send \"filter\"\ncommands to request a partial clone or partial fetch and request that the server omit various\nobjects from the packfile.\n\nSESSION-ID=<SESSION ID>\nThe server may advertise a session ID that can be used to identify this process across\nmultiple requests. The client may advertise its own session ID back to the server as well.\n\nSession IDs should be unique to a given process. They must fit within a packet-line, and must\nnot contain non-printable or whitespace characters. The current implementation uses trace2\nsession IDs (see api-trace2[1] for details), but this may change and users of the session ID\nshould not rely on this fact.\n",
            "subsections": []
        },
        "GIT": {
            "content": "Part of the git(1) suite\n",
            "subsections": []
        },
        "NOTES": {
            "content": "1. api-trace2\nfile:///usr/share/doc/git/html/technical/api-trace2.html\n\nGit 2.43.0                                   07/02/2025                  GITPROTOCOL-CAPABILITIES(5)",
            "subsections": []
        }
    },
    "summary": "gitprotocol-capabilities - Protocol v0 and v1 capabilities",
    "flags": [],
    "examples": [],
    "see_also": []
}