Skip to content

Commit 650134a

Browse files
rscharfegitster
authored andcommitted
archive: update format documentation
Mention all formats in the --format section, use backtick quoting for literal values throughout, clarify the description of the configuration option. Helped-by: Junio C Hamano <[email protected]> Signed-off-by: René Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5699ec1 commit 650134a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Documentation/git-archive.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ OPTIONS
3434
-------
3535

3636
--format=<fmt>::
37-
Format of the resulting archive: 'tar' or 'zip'. If this option
37+
Format of the resulting archive. Possible values are `tar`,
38+
`zip`, `tar.gz`, `tgz`, and any format defined using the
39+
configuration option `tar.<format>.command`. If `--format`
3840
is not given, and the output file is specified, the format is
39-
inferred from the filename if possible (e.g. writing to "foo.zip"
40-
makes the output to be in the zip format). Otherwise the output
41+
inferred from the filename if possible (e.g. writing to `foo.zip`
42+
makes the output to be in the `zip` format). Otherwise the output
4143
format is `tar`.
4244

4345
-l::
@@ -143,17 +145,15 @@ tar.<format>.command::
143145
is executed using the shell with the generated tar file on its
144146
standard input, and should produce the final output on its
145147
standard output. Any compression-level options will be passed
146-
to the command (e.g., "-9"). An output file with the same
147-
extension as `<format>` will be use this format if no other
148-
format is given.
148+
to the command (e.g., `-9`).
149149
+
150-
The "tar.gz" and "tgz" formats are defined automatically and default to
151-
`gzip -cn`. You may override them with custom commands.
150+
The `tar.gz` and `tgz` formats are defined automatically and use the
151+
command `gzip -cn` by default.
152152

153153
tar.<format>.remote::
154-
If true, enable `<format>` for use by remote clients via
154+
If true, enable the format for use by remote clients via
155155
linkgit:git-upload-archive[1]. Defaults to false for
156-
user-defined formats, but true for the "tar.gz" and "tgz"
156+
user-defined formats, but true for the `tar.gz` and `tgz`
157157
formats.
158158

159159
[[ATTRIBUTES]]

0 commit comments

Comments
 (0)