git-upload-archive.txt 2.0 KB

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