]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-upload-archive.txt
t4034: abstract away SHA-1-specific constants
[thirdparty/git.git] / Documentation / git-upload-archive.txt
CommitLineData
39345a21 1git-upload-archive(1)
142d035a 2=====================
39345a21
FBH
3
4NAME
5----
c3f0baac 6git-upload-archive - Send archive back to git-archive
39345a21
FBH
7
8
9SYNOPSIS
10--------
7791a1d9 11[verse]
b1889c36 12'git upload-archive' <directory>
39345a21
FBH
13
14DESCRIPTION
15-----------
0b444cdb 16Invoked by 'git archive --remote' and sends a generated archive to the
2de9b711 17other end over the Git protocol.
39345a21
FBH
18
19This command is usually not invoked directly by the end user. The UI
0b444cdb 20for the protocol is on the 'git archive' side, and the program pair
39345a21
FBH
21is meant to be used to get an archive from a remote repository.
22
69897bc2
JK
23SECURITY
24--------
25
26In order to protect the privacy of objects that have been removed from
27history but may not yet have been pruned, `git-upload-archive` avoids
28serving archives for commits and trees that are not reachable from the
29repository's refs. However, because calculating object reachability is
30computationally expensive, `git-upload-archive` implements a stricter
31but easier-to-check set of rules:
32
33 1. Clients may request a commit or tree that is pointed to directly by
34 a ref. E.g., `git archive --remote=origin v1.0`.
35
36 2. Clients may request a sub-tree within a commit or tree using the
37 `ref:path` syntax. E.g., `git archive --remote=origin v1.0:Documentation`.
38
39 3. Clients may _not_ use other sha1 expressions, even if the end
40 result is reachable. E.g., neither a relative commit like `master^`
41 nor a literal sha1 like `abcd1234` is allowed, even if the result
42 is reachable from the refs.
43
44Note that rule 3 disallows many cases that do not have any privacy
45implications. These rules are subject to change in future versions of
46git, and the server accessed by `git archive --remote` may or may not
47follow these exact rules.
48
7671b632
SG
49If the config option `uploadArchive.allowUnreachable` is true, these
50rules are ignored, and clients may use arbitrary sha1 expressions.
51This is useful if you do not care about the privacy of unreachable
52objects, or if your object database is already publicly available for
53access via non-smart-http.
54
39345a21
FBH
55OPTIONS
56-------
57<directory>::
58 The repository to get a tar archive from.
59
39345a21
FBH
60GIT
61---
9e1f0a85 62Part of the linkgit:git[1] suite