Autogenerated manpages for v2.48.1-40-gefff4
[git-manpages.git] / man1 / git-upload-archive.1
blobc5e26363918d3650f0cc08f7cfde13ed57778d5d
1 '\" t
2 .\"     Title: git-upload-archive
3 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
4 .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
5 .\"      Date: 2025-01-16
6 .\"    Manual: Git Manual
7 .\"    Source: Git 2.48.1.40.gefff4a85a4
8 .\"  Language: English
9 .\"
10 .TH "GIT\-UPLOAD\-ARCHIVE" "1" "2025-01-16" "Git 2\&.48\&.1\&.40\&.gefff4a8" "Git Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 git-upload-archive \- Send archive back to git\-archive
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 \fIgit upload\-archive\fR <repository>
36 .fi
37 .SH "DESCRIPTION"
38 .sp
39 Invoked by \fIgit archive \-\-remote\fR and sends a generated archive to the other end over the Git protocol\&.
40 .sp
41 This command is usually not invoked directly by the end user\&. The UI for the protocol is on the \fIgit archive\fR side, and the program pair is meant to be used to get an archive from a remote repository\&.
42 .SH "SECURITY"
43 .sp
44 In order to protect the privacy of objects that have been removed from history but may not yet have been pruned, \fBgit\-upload\-archive\fR avoids serving archives for commits and trees that are not reachable from the repository\(cqs refs\&. However, because calculating object reachability is computationally expensive, \fBgit\-upload\-archive\fR implements a stricter but easier\-to\-check set of rules:
45 .sp
46 .RS 4
47 .ie n \{\
48 \h'-04' 1.\h'+01'\c
49 .\}
50 .el \{\
51 .sp -1
52 .IP "  1." 4.2
53 .\}
54 Clients may request a commit or tree that is pointed to directly by a ref\&. E\&.g\&.,
55 \fBgit\fR
56 \fBarchive\fR
57 \fB\-\-remote=origin\fR
58 \fBv1\&.0\fR\&.
59 .RE
60 .sp
61 .RS 4
62 .ie n \{\
63 \h'-04' 2.\h'+01'\c
64 .\}
65 .el \{\
66 .sp -1
67 .IP "  2." 4.2
68 .\}
69 Clients may request a sub\-tree within a commit or tree using the
70 \fBref:path\fR
71 syntax\&. E\&.g\&.,
72 \fBgit\fR
73 \fBarchive\fR
74 \fB\-\-remote=origin\fR
75 \fBv1\&.0:Documentation\fR\&.
76 .RE
77 .sp
78 .RS 4
79 .ie n \{\
80 \h'-04' 3.\h'+01'\c
81 .\}
82 .el \{\
83 .sp -1
84 .IP "  3." 4.2
85 .\}
86 Clients may
87 \fInot\fR
88 use other sha1 expressions, even if the end result is reachable\&. E\&.g\&., neither a relative commit like
89 \fBmaster^\fR
90 nor a literal sha1 like
91 \fBabcd1234\fR
92 is allowed, even if the result is reachable from the refs\&.
93 .RE
94 .sp
95 Note that rule 3 disallows many cases that do not have any privacy implications\&. These rules are subject to change in future versions of git, and the server accessed by \fBgit\fR \fBarchive\fR \fB\-\-remote\fR may or may not follow these exact rules\&.
96 .sp
97 If the config option \fBuploadArchive\&.allowUnreachable\fR is true, these rules are ignored, and clients may use arbitrary sha1 expressions\&. This is useful if you do not care about the privacy of unreachable objects, or if your object database is already publicly available for access via non\-smart\-http\&.
98 .SH "OPTIONS"
99 .PP
100 <repository>
101 .RS 4
102 The repository to get a tar archive from\&.
104 .SH "GIT"
106 Part of the \fBgit\fR(1) suite