From: Dmitry Ivankov Date: Sun, 18 Sep 2011 21:20:45 GMT Subject: [PATCH 1/2] fast-import: add 'commit from 0{40}' failing test Message-ID: <1316380846-15845-2-git-send-email-divanorama@gmail.com> In-Reply-To: <1316380846-15845-1-git-send-email-divanorama@gmail.com> Following shouldn't be allowed, while it is: commit refs/heads/some committer ... data ... from `null_sha1` It is treated as if 'from' was omitted. But it is allowed to just omit 'from' actually. And `null_sha1` being special in fast-import is an internal implementation detail. Add a test as described. Signed-off-by: Dmitry Ivankov --- t/t9300-fast-import.sh | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 1a6c066..8cc3f16 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -375,6 +375,18 @@ test_expect_success 'B: fail on invalid branch name "bad[branch]name"' ' rm -f .git/objects/pack_* .git/objects/index_* cat >input < $GIT_COMMITTER_DATE +data 0 + +from 0000000000000000000000000000000000000000 +INPUT_END +test_expect_failure 'B: fail on "from 0{40}"' ' + test_must_fail git fast-import input < $GIT_COMMITTER_DATE data <