aboutsummaryrefslogtreecommitdiff
path: root/Documentation/git-archive.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/git-archive.txt')
-rw-r--r--Documentation/git-archive.txt19
1 files changed, 18 insertions, 1 deletions
diff --git a/Documentation/git-archive.txt b/Documentation/git-archive.txt
index 94519aae23..56989a2f34 100644
--- a/Documentation/git-archive.txt
+++ b/Documentation/git-archive.txt
@@ -51,7 +51,7 @@ OPTIONS
--prefix=<prefix>/::
Prepend <prefix>/ to paths in the archive. Can be repeated; its
rightmost value is used for all tracked files. See below which
- value gets used by `--add-file`.
+ value gets used by `--add-file` and `--add-virtual-file`.
-o <file>::
--output=<file>::
@@ -63,6 +63,23 @@ OPTIONS
concatenating the value of the last `--prefix` option (if any)
before this `--add-file` and the basename of <file>.
+--add-virtual-file=<path>:<content>::
+ Add the specified contents to the archive. Can be repeated to add
+ multiple files. The path of the file in the archive is built
+ by concatenating the value of the last `--prefix` option (if any)
+ before this `--add-virtual-file` and `<path>`.
++
+The `<path>` argument can start and end with a literal double-quote
+character; the contained file name is interpreted as a C-style string,
+i.e. the backslash is interpreted as escape character. The path must
+be quoted if it contains a colon, to avoid the colon from being
+misinterpreted as the separator between the path and the contents, or
+if the path begins or ends with a double-quote character.
++
+The file mode is limited to a regular file, and the option may be
+subject to platform-dependent command-line limits. For non-trivial
+cases, write an untracked file and use `--add-file` instead.
+
--worktree-attributes::
Look for attributes in .gitattributes files in the working tree
as well (see <<ATTRIBUTES>>).