blob: a439f0dfad0739208375587442d5d016d7bb5ae3 [file] [log] [blame]
'\" t
.\" Title: git-upload-archive
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 11/22/2018
.\" Manual: Git Manual
.\" Source: Git 2.20.0.rc1
.\" Language: English
.\"
.TH "GIT\-UPLOAD\-ARCHIVE" "1" "11/22/2018" "Git 2\&.20\&.0\&.rc1" "Git Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
git-upload-archive \- Send archive back to git\-archive
.SH "SYNOPSIS"
.sp
.nf
\fIgit upload\-archive\fR <directory>
.fi
.sp
.SH "DESCRIPTION"
.sp
Invoked by \fIgit archive \-\-remote\fR and sends a generated archive to the other end over the Git protocol\&.
.sp
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\&.
.SH "SECURITY"
.sp
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:
.sp
.RS 4
.ie n \{\
\h'-04' 1.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 1." 4.2
.\}
Clients may request a commit or tree that is pointed to directly by a ref\&. E\&.g\&.,
\fBgit archive \-\-remote=origin v1\&.0\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 2.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 2." 4.2
.\}
Clients may request a sub\-tree within a commit or tree using the
\fBref:path\fR
syntax\&. E\&.g\&.,
\fBgit archive \-\-remote=origin v1\&.0:Documentation\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 3.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 3." 4.2
.\}
Clients may
\fInot\fR
use other sha1 expressions, even if the end result is reachable\&. E\&.g\&., neither a relative commit like
\fBmaster^\fR
nor a literal sha1 like
\fBabcd1234\fR
is allowed, even if the result is reachable from the refs\&.
.RE
.sp
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 archive \-\-remote\fR may or may not follow these exact rules\&.
.sp
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\&.
.SH "OPTIONS"
.PP
<directory>
.RS 4
The repository to get a tar archive from\&.
.RE
.SH "GIT"
.sp
Part of the \fBgit\fR(1) suite