Franck Bui-Huu | 39345a2 | 2006-09-07 15:12:05 +0200 | [diff] [blame] | 1 | git-upload-archive(1) |
Junio C Hamano | 142d035 | 2015-10-22 10:09:07 -0700 | [diff] [blame] | 2 | ===================== |
Franck Bui-Huu | 39345a2 | 2006-09-07 15:12:05 +0200 | [diff] [blame] | 3 | |
| 4 | NAME |
| 5 | ---- |
Junio C Hamano | c3f0baa | 2007-01-18 15:53:37 -0800 | [diff] [blame] | 6 | git-upload-archive - Send archive back to git-archive |
Franck Bui-Huu | 39345a2 | 2006-09-07 15:12:05 +0200 | [diff] [blame] | 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
Martin von Zweigbergk | 7791a1d | 2011-07-01 22:38:26 -0400 | [diff] [blame] | 11 | [verse] |
Jonathan Nieder | b1889c3 | 2008-06-30 01:09:04 -0500 | [diff] [blame] | 12 | 'git upload-archive' <directory> |
Franck Bui-Huu | 39345a2 | 2006-09-07 15:12:05 +0200 | [diff] [blame] | 13 | |
| 14 | DESCRIPTION |
| 15 | ----------- |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 16 | Invoked by 'git archive --remote' and sends a generated archive to the |
Thomas Ackermann | 2de9b71 | 2013-01-21 20:17:53 +0100 | [diff] [blame] | 17 | other end over the Git protocol. |
Franck Bui-Huu | 39345a2 | 2006-09-07 15:12:05 +0200 | [diff] [blame] | 18 | |
| 19 | This command is usually not invoked directly by the end user. The UI |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 20 | for the protocol is on the 'git archive' side, and the program pair |
Franck Bui-Huu | 39345a2 | 2006-09-07 15:12:05 +0200 | [diff] [blame] | 21 | is meant to be used to get an archive from a remote repository. |
| 22 | |
Jeff King | 69897bc | 2014-02-28 05:01:29 -0500 | [diff] [blame] | 23 | SECURITY |
| 24 | -------- |
| 25 | |
| 26 | In order to protect the privacy of objects that have been removed from |
| 27 | history but may not yet have been pruned, `git-upload-archive` avoids |
| 28 | serving archives for commits and trees that are not reachable from the |
| 29 | repository's refs. However, because calculating object reachability is |
| 30 | computationally expensive, `git-upload-archive` implements a stricter |
| 31 | but 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 | |
| 44 | Note that rule 3 disallows many cases that do not have any privacy |
| 45 | implications. These rules are subject to change in future versions of |
| 46 | git, and the server accessed by `git archive --remote` may or may not |
| 47 | follow these exact rules. |
| 48 | |
Scott J. Goldman | 7671b63 | 2014-02-28 05:04:19 -0500 | [diff] [blame] | 49 | If the config option `uploadArchive.allowUnreachable` is true, these |
| 50 | rules are ignored, and clients may use arbitrary sha1 expressions. |
| 51 | This is useful if you do not care about the privacy of unreachable |
| 52 | objects, or if your object database is already publicly available for |
| 53 | access via non-smart-http. |
| 54 | |
Franck Bui-Huu | 39345a2 | 2006-09-07 15:12:05 +0200 | [diff] [blame] | 55 | OPTIONS |
| 56 | ------- |
| 57 | <directory>:: |
| 58 | The repository to get a tar archive from. |
| 59 | |
Franck Bui-Huu | 39345a2 | 2006-09-07 15:12:05 +0200 | [diff] [blame] | 60 | GIT |
| 61 | --- |
Christian Couder | 9e1f0a8 | 2008-06-06 09:07:32 +0200 | [diff] [blame] | 62 | Part of the linkgit:git[1] suite |