Junio C Hamano | 215a7ad | 2005-09-07 17:26:23 -0700 | [diff] [blame] | 1 | git-http-fetch(1) |
| 2 | ================= |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 3 | |
| 4 | NAME |
| 5 | ---- |
Thomas Ackermann | 2de9b71 | 2013-01-21 20:17:53 +0100 | [diff] [blame] | 6 | git-http-fetch - Download from a remote Git repository via HTTP |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
Martin von Zweigbergk | 7791a1d | 2011-07-01 22:38:26 -0400 | [diff] [blame] | 11 | [verse] |
Jean-Noël Avila | 7706294 | 2021-11-06 19:48:55 +0100 | [diff] [blame] | 12 | 'git http-fetch' [-c] [-t] [-a] [-d] [-v] [-w <filename>] [--recover] [--stdin | --packfile=<hash> | <commit>] <URL> |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 13 | |
| 14 | DESCRIPTION |
| 15 | ----------- |
Thomas Ackermann | 2de9b71 | 2013-01-21 20:17:53 +0100 | [diff] [blame] | 16 | Downloads a remote Git repository via HTTP. |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 17 | |
Martin Ågren | 2e85a0c | 2018-04-22 20:12:49 +0200 | [diff] [blame] | 18 | This command always gets all objects. Historically, there were three options |
| 19 | `-a`, `-c` and `-t` for choosing which objects to download. They are now |
| 20 | silently ignored. |
Ben Walton | a6c786f | 2011-08-23 20:29:51 -0400 | [diff] [blame] | 21 | |
Nikolai Weibull | 5dd7342 | 2005-12-09 00:28:05 +0100 | [diff] [blame] | 22 | OPTIONS |
| 23 | ------- |
| 24 | commit-id:: |
| 25 | Either the hash or the filename under [URL]/refs/ to |
| 26 | pull. |
| 27 | |
Martin Ågren | 2e85a0c | 2018-04-22 20:12:49 +0200 | [diff] [blame] | 28 | -a, -c, -t:: |
| 29 | These options are ignored for historical reasons. |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 30 | -v:: |
| 31 | Report what is downloaded. |
Johannes Schindelin | 2c6e477 | 2005-08-05 17:05:02 +0200 | [diff] [blame] | 32 | |
| 33 | -w <filename>:: |
Elijah Newren | cf6cac2 | 2023-10-08 06:45:03 +0000 | [diff] [blame] | 34 | Writes the commit-id into the specified filename under $GIT_DIR/refs/<filename> on |
Junio C Hamano | 613d872 | 2005-06-25 02:25:57 -0700 | [diff] [blame] | 35 | the local end after the transfer is complete. |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 36 | |
Petr Baudis | 8e29f6a | 2006-07-27 23:56:22 +0200 | [diff] [blame] | 37 | --stdin:: |
Brian Hetro | 0278307 | 2007-08-23 20:44:13 -0400 | [diff] [blame] | 38 | Instead of a commit id on the command line (which is not expected in this |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 39 | case), 'git http-fetch' expects lines on stdin in the format |
Petr Baudis | 8e29f6a | 2006-07-27 23:56:22 +0200 | [diff] [blame] | 40 | |
| 41 | <commit-id>['\t'<filename-as-in--w>] |
| 42 | |
Jonathan Tan | 8d5d2a3 | 2020-06-10 13:57:18 -0700 | [diff] [blame] | 43 | --packfile=<hash>:: |
Jonathan Tan | 27e35ba | 2021-02-22 11:20:07 -0800 | [diff] [blame] | 44 | For internal use only. Instead of a commit id on the command |
| 45 | line (which is not expected in |
Jonathan Tan | 8d5d2a3 | 2020-06-10 13:57:18 -0700 | [diff] [blame] | 46 | this case), 'git http-fetch' fetches the packfile directly at the given |
| 47 | URL and uses index-pack to generate corresponding .idx and .keep files. |
| 48 | The hash is used to determine the name of the temporary file and is |
Jonathan Tan | 27e35ba | 2021-02-22 11:20:07 -0800 | [diff] [blame] | 49 | arbitrary. The output of index-pack is printed to stdout. Requires |
| 50 | --index-pack-args. |
| 51 | |
| 52 | --index-pack-args=<args>:: |
| 53 | For internal use only. The command to run on the contents of the |
| 54 | downloaded pack. Arguments are URL-encoded separated by spaces. |
Jonathan Tan | 8d5d2a3 | 2020-06-10 13:57:18 -0700 | [diff] [blame] | 55 | |
Andrew Ruder | 71e2e59 | 2007-04-26 23:59:02 -0500 | [diff] [blame] | 56 | --recover:: |
| 57 | Verify that everything reachable from target is fetched. Used after |
| 58 | an earlier fetch is interrupted. |
| 59 | |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [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 |