From: Dmitry Ivankov Date: Thu, 11 Aug 2011 10:21:06 GMT Subject: [PATCH v2 1/5] fast-import: add input format tests Message-ID: <1313058070-4774-2-git-send-email-divanorama@gmail.com> In-Reply-To: <1313058070-4774-1-git-send-email-divanorama@gmail.com> Documentation/git-fast-import.txt says that git-fast-import is strict about it's input format. But committer/author field parsing is a bit loose. Invalid values can be unnoticed and written out to the commit, either with format-conforming input or with non-format-conforming one. Add one passing and one failing test for empty/absent committer name with well-formed input. And a failed test with unnoticed ill-formed input. Reported-by: SASAKI Suguru Signed-off-by: Dmitry Ivankov --- t/t9300-fast-import.sh | 99 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 99 insertions(+), 0 deletions(-) diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index f256475..0844e9d 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -324,6 +324,105 @@ test_expect_success \ test `git rev-parse master` = `git rev-parse TEMP_TAG^`' rm -f .git/TEMP_TAG +git gc 2>/dev/null >/dev/null +git prune 2>/dev/null >/dev/null + +cat >input < $GIT_COMMITTER_DATE +data </dev/null >/dev/null +git prune 2>/dev/null >/dev/null + +cat >input < $GIT_COMMITTER_DATE +data </dev/null >/dev/null +git prune 2>/dev/null >/dev/null + +cat >input < $GIT_COMMITTER_DATE +data <input < $GIT_COMMITTER_DATE +data <input <> $GIT_COMMITTER_DATE +data <input <input < $GIT_COMMITTER_DATE +data <