]> git.ipfire.org Git - thirdparty/git.git/commitdiff
archive: document --prefix handling of absolute and parent paths
authorPushkar Singh <pushkarkumarsingh1970@gmail.com>
Wed, 8 Apr 2026 16:00:06 +0000 (16:00 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 8 Apr 2026 18:13:52 +0000 (11:13 -0700)
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>
Documentation/git-archive.adoc

index a0e3fe7996e57b001acef17030a7d47ac59c9ba1..086bade6d8d8a2b8dd95e87636ffa9f0c9c7f5d9 100644 (file)
@@ -54,6 +54,11 @@ OPTIONS
        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`.
++
+The <prefix> is used as given and is not normalized. It may
+include leading slashes or parent directory components (e.g.,
+`../`). Some archive consumers may treat such paths as
+potentially unsafe and adjust or warn during extraction.
 
 -o <file>::
 --output=<file>::