Skip to content

Commit 1dcfd67

Browse files
pushkarscriptsgitster
authored andcommitted
archive: document --prefix handling of absolute and parent paths
Clarify that --prefix is used as given and is not normalized, and may include leading slashes or parent directory components. Signed-off-by: Pushkar Singh <pushkarkumarsingh1970@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 9a2fb14 commit 1dcfd67

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Documentation/git-archive.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ OPTIONS
5454
Prepend <prefix>/ to paths in the archive. Can be repeated; its
5555
rightmost value is used for all tracked files. See below which
5656
value gets used by `--add-file`.
57+
+
58+
The <prefix> is used as given and is not normalized. It may
59+
include leading slashes or parent directory components (e.g.,
60+
`../`). Some archive consumers may treat such paths as
61+
potentially unsafe and adjust or warn during extraction.
5762

5863
-o <file>::
5964
--output=<file>::

0 commit comments

Comments
 (0)