Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/Documentation/config/uploadpack.adoc # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / Documentation / config / uploadpack.adoc` 145 lines ยท 7340 bytes Raw Blame History 1 uploadpack.hideRefs:: 2 This variable is the same as `transfer.hideRefs`, but applies 3 only to `upload-pack` (and so affects only fetches, not pushes). 4 An attempt to fetch a hidden ref by `git fetch` will fail. See 5 also `uploadpack.allowTipSHA1InWant`. 6 7 uploadpack.allowTipSHA1InWant:: 8 When `uploadpack.hideRefs` is in effect, allow `upload-pack` 9 to accept a fetch request that asks for an object at the tip 10 of a hidden ref (by default, such a request is rejected). 11 See also `uploadpack.hideRefs`. Even if this is false, a client 12 may be able to steal objects via the techniques described in the 13 "SECURITY" section of the linkgit:gitnamespaces[7] man page; it's 14 best to keep private data in a separate repository. 15 16 uploadpack.allowReachableSHA1InWant:: 17 Allow `upload-pack` to accept a fetch request that asks for an 18 object that is reachable from any ref tip. However, note that 19 calculating object reachability is computationally expensive. 20 Defaults to `false`. Even if this is false, a client may be able 21 to steal objects via the techniques described in the "SECURITY" 22 section of the linkgit:gitnamespaces[7] man page; it's best to 23 keep private data in a separate repository. 24 25 uploadpack.allowAnySHA1InWant:: 26 Allow `upload-pack` to accept a fetch request that asks for any 27 object at all. 28 It implies `uploadpack.allowTipSHA1InWant` and 29 `uploadpack.allowReachableSHA1InWant`. If set to `true` it will 30 enable both of them, it set to `false` it will disable both of 31 them. 32 By default not set. 33 34 uploadpack.keepAlive:: 35 When `upload-pack` has started `pack-objects`, there may be a 36 quiet period while `pack-objects` prepares the pack. Normally 37 it would output progress information, but if `--quiet` was used 38 for the fetch, `pack-objects` will output nothing at all until 39 the pack data begins. Some clients and networks may consider 40 the server to be hung and give up. Setting this option instructs 41 `upload-pack` to send an empty keepalive packet every 42 `uploadpack.keepAlive` seconds. Setting this option to 0 43 disables keepalive packets entirely. The default is 5 seconds. 44 45 uploadpack.packObjectsHook:: 46 If this option is set, when `upload-pack` would run 47 `git pack-objects` to create a packfile for a client, it will 48 run this shell command instead. The `pack-objects` command and 49 arguments it _would_ have run (including the `git pack-objects` 50 at the beginning) are appended to the shell command. The stdin 51 and stdout of the hook are treated as if `pack-objects` itself 52 was run. I.e., `upload-pack` will feed input intended for 53 `pack-objects` to the hook, and expects a completed packfile on 54 stdout. 55 + 56 Note that this configuration variable is only respected when it is specified 57 in protected configuration (see <>). This is a safety measure 58 against fetching from untrusted repositories. 59 60 uploadpack.allowFilter:: 61 If this option is set, `upload-pack` will support partial 62 clone and partial fetch object filtering. 63 64 uploadpackfilter.allow:: 65 Provides a default value for unspecified object filters (see: the 66 below configuration variable). If set to `true`, this will also 67 enable all filters which get added in the future. 68 Defaults to `true`. 69 70 uploadpackfilter..allow:: 71 Explicitly allow or ban the object filter corresponding to 72 ``, where `` may be one of: `blob:none`, 73 `blob:limit`, `object:type`, `tree`, `sparse:oid`, or `combine`. 74 If using combined filters, both `combine` and all of the nested 75 filter kinds must be allowed. Defaults to `uploadpackfilter.allow`. 76 77 uploadpackfilter.tree.maxDepth:: 78 Only allow `--filter=tree:` when `` is no more than the value of 79 `uploadpackfilter.tree.maxDepth`. If set, this also implies 80 `uploadpackfilter.tree.allow=true`, unless this configuration 81 variable had already been set. Has no effect if unset. 82 83 uploadpack.allowRefInWant:: 84 If this option is set, `upload-pack` will support the `ref-in-want` 85 feature of the protocol version 2 `fetch` command. This feature 86 is intended for the benefit of load-balanced servers which may 87 not have the same view of what OIDs their refs point to due to 88 replication delay. 89 90 uploadpack.lazyFetchTrusted:: 91 A multi-valued configuration variable, each value of which 92 specifies the absolute local path of a repository that 93 `upload-pack` is allowed to lazily fetch missing objects for. 94 + 95 A repository is identified by its git directory, after following any 96 `.git` file and resolving symbolic links. That is the repository 97 itself if it is bare, the `.git` directory of a repository that has a 98 worktree, or the directory that a `.git` file points to, for example 99 when the repository was created with `--separate-git-dir` or for a 100 linked worktree (see linkgit:git-worktree[1]). So a non-bare 101 repository served as `/srv/repo` usually has to be allowlisted as 102 `/srv/repo/.git`. Giving a path with `/*` appended to it will trust 103 all repositories under the named directory. To trust all served 104 repositories, set `uploadpack.lazyFetchTrusted` to the string `*`. 105 + 106 The value of this setting is interpolated, i.e., `~/` expands to 107 a path relative to the home directory and `%(prefix)/` expands 108 to a path relative to Git's (runtime) prefix. 109 + 110 By default, `upload-pack` refuses to lazily fetch (see the description 111 of the `GIT_NO_LAZY_FETCH` environment variable in 112 linkgit:git-upload-pack[1]), because doing so would run `git fetch`, 113 which may execute arbitrary commands specified in the configuration 114 and hooks of the served repository. Listing a repository here tells 115 `upload-pack` that it is trusted, so lazy fetching from the promisor 116 remotes configured in it is allowed. This is similar to setting 117 `GIT_NO_LAZY_FETCH` to `0`, but only for the matching repositories: 118 unlike that environment variable, the trust is not inherited by child 119 processes. So if a trusted repository lazily fetches from a promisor 120 remote that is itself served by `upload-pack` on the same machine, 121 for example through a local path or a `file://` URL, lazy fetching is 122 allowed there only if that promisor remote is also listed here. An 123 explicitly set `GIT_NO_LAZY_FETCH` takes precedence over this setting. 124 + 125 Note that this allows lazy fetching from any promisor remote 126 configured in the served repository, not only from the promisor 127 remotes that the client accepted using the "promisor-remote" protocol 128 v2 capability (see linkgit:gitprotocol-v2[5]). The served repository 129 is trusted as a whole, including its configuration, so the promisor 130 remotes it configures are trusted too. It is the server operator's 131 responsibility to make sure that the promisor remotes of a trusted 132 repository are also trustworthy. In particular, a trusted repository 133 should not be configured as its own promisor remote, as `upload-pack` 134 would then try to lazily fetch missing objects from the repository 135 itself, which is pointless. 136 + 137 As this is a multi-valued setting, you can add more than one 138 repository via `git config (--global|--system) --add`. To reset the 139 list of trusted repositories (e.g., to override any such repositories 140 specified in the system config), add an `uploadpack.lazyFetchTrusted` 141 entry with an empty value. 142 + 143 Note that this configuration variable is only respected when it is 144 specified in protected configuration (see <>). This prevents 145 untrusted repositories from tampering with this value.