aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorThalia Archibald <thalia@archibald.dev>2024-04-14 01:12:19 +0000
committerJunio C Hamano <gitster@pobox.com>2024-04-15 10:06:18 -0700
commitbe4d6a371e80e16ae02d1f258103493394e4c155 (patch)
tree86f901d9e76b907f745506e03f97df6a1f763d80 /Documentation
parenta923a04b80885368acacaf280eb0db16270e5a5b (diff)
downloadgit-be4d6a371e80e16ae02d1f258103493394e4c155.tar.gz
fast-import: forbid escaped NUL in paths
NUL cannot appear in paths. Even disregarding filesystem path limitations, the tree object format delimits with NUL, so such a path cannot be encoded by Git. When a quoted path is unquoted, it could possibly contain NUL from "\000". Forbid it so it isn't truncated. fast-import still has other issues with NUL, but those will be addressed later. Signed-off-by: Thalia Archibald <thalia@archibald.dev> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-fast-import.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
index c6082c3b49..8b6dde45f1 100644
--- a/Documentation/git-fast-import.txt
+++ b/Documentation/git-fast-import.txt
@@ -661,6 +661,7 @@ and its value must be in canonical form. That is it must not:
The root of the tree can be represented by an empty string as `<path>`.
+`<path>` cannot contain NUL, either literally or escaped as `\000`.
It is recommended that `<path>` always be encoded using UTF-8.
`filedelete`