git/Documentation/git-upload-pack.txt
Jeff King 2834a72d5e docs/git: discuss server-side config for GIT_PROTOCOL
The v2 protocol requires that the GIT_PROTOCOL environment variable gets
passed around, but we don't have any documentation describing how this
is supposed to work. In particular, we need to note what server admins
might need to configure to make things work.

The definition of the GIT_PROTOCOL variable is probably the best place
for this, since:

  - we deal with multiple transports (ssh, http, etc).
    Transport-specific documentation (like the git-http-backend bits
    added in the previous commit) are helpful for those transports, but
    this gives a broader overview. Plus we do not have a specific
    transport endpoint program for ssh, so this is a reasonable place to
    mention it.

  - the server side of the protocol involves multiple programs. For now,
    upload-pack is the only endpoint which uses GIT_PROTOCOL, but that
    will likely expand in the future. We're better off with a central
    discussion of what the server admin might need to do. However, for
    discoverability, this patch adds a pointer from upload-pack's
    documentation.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-10 15:34:59 -07:00

62 lines
1.5 KiB
Plaintext

git-upload-pack(1)
==================
NAME
----
git-upload-pack - Send objects packed back to git-fetch-pack
SYNOPSIS
--------
[verse]
'git-upload-pack' [--[no-]strict] [--timeout=<n>] [--stateless-rpc]
[--advertise-refs] <directory>
DESCRIPTION
-----------
Invoked by 'git fetch-pack', learns what
objects the other side is missing, and sends them after packing.
This command is usually not invoked directly by the end user.
The UI for the protocol is on the 'git fetch-pack' side, and the
program pair is meant to be used to pull updates from a remote
repository. For push operations, see 'git send-pack'.
OPTIONS
-------
--[no-]strict::
Do not try <directory>/.git/ if <directory> is no Git directory.
--timeout=<n>::
Interrupt transfer after <n> seconds of inactivity.
--stateless-rpc::
Perform only a single read-write cycle with stdin and stdout.
This fits with the HTTP POST request processing model where
a program may read the request, write a response, and must exit.
--advertise-refs::
Only the initial ref advertisement is output, and the program exits
immediately. This fits with the HTTP GET request model, where
no request content is received but a response must be produced.
<directory>::
The repository to sync from.
ENVIRONMENT
-----------
`GIT_PROTOCOL`::
Internal variable used for handshaking the wire protocol. Server
admins may need to configure some transports to allow this
variable to be passed. See the discussion in linkgit:git[1].
SEE ALSO
--------
linkgit:gitnamespaces[7]
GIT
---
Part of the linkgit:git[1] suite