David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 1 | git-tar-tree(1) |
| 2 | =============== |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 3 | |
| 4 | NAME |
| 5 | ---- |
Junio C Hamano | c3f0baa | 2007-01-18 15:53:37 -0800 | [diff] [blame] | 6 | git-tar-tree - Create a tar archive of the files in the named tree object |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
Jonathan Nieder | b1889c3 | 2008-06-30 01:09:04 -0500 | [diff] [blame] | 11 | 'git tar-tree' [--remote=<repo>] <tree-ish> [ <base> ] |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 12 | |
| 13 | DESCRIPTION |
| 14 | ----------- |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 15 | THIS COMMAND IS DEPRECATED. Use 'git archive' with `--format=tar` |
Sam Vilain | 9f1beb7 | 2007-04-19 11:51:21 +1200 | [diff] [blame] | 16 | option instead (and move the <base> argument to `--prefix=base/`). |
Junio C Hamano | fd88d9c | 2006-09-24 14:42:01 -0700 | [diff] [blame] | 17 | |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 18 | Creates a tar archive containing the tree structure for the named tree. |
Johannes Schindelin | 2c6e477 | 2005-08-05 17:05:02 +0200 | [diff] [blame] | 19 | When <base> is specified it is added as a leading path to the files in the |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 20 | generated tar archive. |
| 21 | |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 22 | 'git tar-tree' behaves differently when given a tree ID versus when given |
Rene Scharfe | d3a15c4 | 2005-06-02 20:50:42 +0200 | [diff] [blame] | 23 | a commit ID or tag ID. In the first case the current time is used as |
| 24 | modification time of each file in the archive. In the latter case the |
| 25 | commit time as recorded in the referenced commit object is used instead. |
| 26 | Additionally the commit ID is stored in a global extended pax header. |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 27 | It can be extracted using 'git get-tar-commit-id'. |
Rene Scharfe | d3a15c4 | 2005-06-02 20:50:42 +0200 | [diff] [blame] | 28 | |
Junio C Hamano | 34925d3 | 2006-06-07 11:15:10 -0700 | [diff] [blame] | 29 | OPTIONS |
| 30 | ------- |
| 31 | |
| 32 | <tree-ish>:: |
| 33 | The tree or commit to produce tar archive for. If it is |
| 34 | the object name of a commit object. |
| 35 | |
| 36 | <base>:: |
| 37 | Leading path to the files in the resulting tar archive. |
| 38 | |
| 39 | --remote=<repo>:: |
| 40 | Instead of making a tar archive from local repository, |
| 41 | retrieve a tar archive from a remote repository. |
| 42 | |
Willy Tarreau | ce1a79b | 2006-07-20 11:30:44 +0200 | [diff] [blame] | 43 | CONFIGURATION |
| 44 | ------------- |
Willy Tarreau | ce1a79b | 2006-07-20 11:30:44 +0200 | [diff] [blame] | 45 | |
René Scharfe | 687157c | 2007-08-21 20:01:16 +0200 | [diff] [blame] | 46 | tar.umask:: |
| 47 | This variable can be used to restrict the permission bits of |
| 48 | tar archive entries. The default is 0002, which turns off the |
| 49 | world write bit. The special value "user" indicates that the |
| 50 | archiving user's umask will be used instead. See umask(2) for |
| 51 | details. |
Willy Tarreau | ce1a79b | 2006-07-20 11:30:44 +0200 | [diff] [blame] | 52 | |
| 53 | EXAMPLES |
Junio C Hamano | 34925d3 | 2006-06-07 11:15:10 -0700 | [diff] [blame] | 54 | -------- |
Rene Scharfe | 9236cdd | 2006-06-18 12:57:59 +0200 | [diff] [blame] | 55 | git tar-tree HEAD junk | (cd /var/tmp/ && tar xf -):: |
Junio C Hamano | 34925d3 | 2006-06-07 11:15:10 -0700 | [diff] [blame] | 56 | |
| 57 | Create a tar archive that contains the contents of the |
| 58 | latest commit on the current branch, and extracts it in |
| 59 | `/var/tmp/junk` directory. |
| 60 | |
Rene Scharfe | 9236cdd | 2006-06-18 12:57:59 +0200 | [diff] [blame] | 61 | git tar-tree v1.4.0 git-1.4.0 | gzip >git-1.4.0.tar.gz:: |
Junio C Hamano | 34925d3 | 2006-06-07 11:15:10 -0700 | [diff] [blame] | 62 | |
Rene Scharfe | 9236cdd | 2006-06-18 12:57:59 +0200 | [diff] [blame] | 63 | Create a tarball for v1.4.0 release. |
Junio C Hamano | 34925d3 | 2006-06-07 11:15:10 -0700 | [diff] [blame] | 64 | |
Rene Scharfe | 9236cdd | 2006-06-18 12:57:59 +0200 | [diff] [blame] | 65 | git tar-tree v1.4.0{caret}\{tree\} git-1.4.0 | gzip >git-1.4.0.tar.gz:: |
Junio C Hamano | 34925d3 | 2006-06-07 11:15:10 -0700 | [diff] [blame] | 66 | |
Rene Scharfe | 9236cdd | 2006-06-18 12:57:59 +0200 | [diff] [blame] | 67 | Create a tarball for v1.4.0 release, but without a |
| 68 | global extended pax header. |
| 69 | |
| 70 | git tar-tree --remote=example.com:git.git v1.4.0 >git-1.4.0.tar:: |
| 71 | |
| 72 | Get a tarball v1.4.0 from example.com. |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 73 | |
Johannes Schindelin | b63fafd | 2006-07-31 02:26:27 +0200 | [diff] [blame] | 74 | git tar-tree HEAD:Documentation/ git-docs > git-1.4.0-docs.tar:: |
| 75 | |
| 76 | Put everything in the current head's Documentation/ directory |
| 77 | into 'git-1.4.0-docs.tar', with the prefix 'git-docs/'. |
| 78 | |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 79 | Author |
| 80 | ------ |
Rene Scharfe | d3a15c4 | 2005-06-02 20:50:42 +0200 | [diff] [blame] | 81 | Written by Rene Scharfe. |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 82 | |
| 83 | Documentation |
| 84 | -------------- |
| 85 | Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>. |
| 86 | |
| 87 | GIT |
| 88 | --- |
Christian Couder | 9e1f0a8 | 2008-06-06 09:07:32 +0200 | [diff] [blame] | 89 | Part of the linkgit:git[1] suite |