summaryrefslogtreecommitdiff
path: root/Documentation/git-fast-import.txt
diff options
context:
space:
mode:
authorDmitry Ivankov <divanorama@gmail.com>2011-08-11 16:21:08 +0600
committerJunio C Hamano <gitster@pobox.com>2011-08-11 12:21:03 -0700
commit4b4963c0e1aa094900951df9e66459443111ccc9 (patch)
treeee610335e665fab5ecd99a2e7ff6723c5f48ea69 /Documentation/git-fast-import.txt
parent17fb00721b854b1c469e44ad709a9cad2128f11d (diff)
downloadgit-4b4963c0e1aa094900951df9e66459443111ccc9.tar.gz
fast-import: check committer name more strictly
The documentation declares following identity format: (<name> SP)? LT <email> GT where name is any string without LF and LT characters. But fast-import just accepts any string up to first GT instead of checking the whole format, and moreover just writes it as is to the commit object. git-fsck checks for [^<\n]* <[^<>\n]*> format. Note that the space is mandatory. And the space quirk is already handled via extending the string to the left when needed. Modify fast-import input identity format to a slightly stricter one - deny LF, LT and GT in both <name> and <email>. And check for it. This is stricter then git-fsck as fsck accepts "Name> <email>" currently, but soon fsck check will be adjusted likewise. Signed-off-by: Dmitry Ivankov <divanorama@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-fast-import.txt')
-rw-r--r--Documentation/git-fast-import.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
index 3f5b9126b1..0ca24a89f8 100644
--- a/Documentation/git-fast-import.txt
+++ b/Documentation/git-fast-import.txt
@@ -413,8 +413,8 @@ Here `<name>` is the person's display name (for example
(``cm@example.com''). `LT` and `GT` are the literal less-than (\x3c)
and greater-than (\x3e) symbols. These are required to delimit
the email address from the other fields in the line. Note that
-`<name>` is free-form and may contain any sequence of bytes, except
-`LT` and `LF`. It is typically UTF-8 encoded.
+`<name>` and `<email>` are free-form and may contain any sequence
+of bytes, except `LT`, `GT` and `LF`. `<name>` is typically UTF-8 encoded.
The time of the change is specified by `<when>` using the date format
that was selected by the \--date-format=<fmt> command line option.