[PATCH] archive: document --prefix handling of absolute and parent paths
- From
Pushkar Singh <pushkarkumarsingh1970@gmail.com>
- Date
- Apr 8, 2026, 16:00 UTC
- Message-ID
- <20260408160005.193621-2-pushkarkumarsingh1970@gmail.com>
- In-Reply-To
- <20260407162101.2285-1-pushkarkumarsingh1970@gmail.com>
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> --- Documentation/git-archive.adoc | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/Documentation/git-archive.adoc b/Documentation/git-archive.adoc index a0e3fe7996..086bade6d8 100644 --- a/Documentation/git-archive.adoc +++ b/Documentation/git-archive.adoc @@ -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>::
-- 2.53.0.582.gca1db8a0f7