From: Pushkar Singh <pushkarkumarsingh1970@gmail.com>
To: pushkarkumarsingh1970@gmail.com
Cc: git@vger.kernel.org, gitster@pobox.com, peff@peff.net
Subject: [PATCH] archive: document --prefix handling of absolute and parent paths
Date: Wed, 8 Apr 2026 16:00:06 +0000 [thread overview]
Message-ID: <20260408160005.193621-2-pushkarkumarsingh1970@gmail.com> (raw)
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
next prev parent reply other threads:[~2026-04-08 16:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-07 16:21 [RFC] archive: behavior of --prefix with absolute or parent path components Pushkar Singh
2026-04-07 19:24 ` Jeff King
2026-04-07 19:57 ` Junio C Hamano
2026-04-07 22:24 ` brian m. carlson
2026-04-08 16:00 ` Pushkar Singh [this message]
2026-04-08 17:40 ` [PATCH] archive: document --prefix handling of absolute and parent paths Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260408160005.193621-2-pushkarkumarsingh1970@gmail.com \
--to=pushkarkumarsingh1970@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox