Merge commit 'junio/next' into next
[git/platforms/storm.git] / t / t1100-commit-tree-options.sh
blob7f7fc36734d96de96801c59af41024db97dc614d
1 #!/bin/sh
3 # Copyright (C) 2005 Rene Scharfe
6 test_description='git commit-tree options test
8 This test checks that git commit-tree can create a specific commit
9 object by defining all environment variables that it understands.
12 . ./test-lib.sh
14 cat >expected <<EOF
15 tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
16 author Author Name <author@email> 1117148400 +0000
17 committer Committer Name <committer@email> 1117150200 +0000
19 comment text
20 EOF
22 test_expect_success \
23 'test preparation: write empty tree' \
24 'git write-tree >treeid'
26 test_expect_success \
27 'construct commit' \
28 'echo comment text |
29 GIT_AUTHOR_NAME="Author Name" \
30 GIT_AUTHOR_EMAIL="author@email" \
31 GIT_AUTHOR_DATE="2005-05-26 23:00" \
32 GIT_COMMITTER_NAME="Committer Name" \
33 GIT_COMMITTER_EMAIL="committer@email" \
34 GIT_COMMITTER_DATE="2005-05-26 23:30" \
35 TZ=GMT git commit-tree `cat treeid` >commitid 2>/dev/null'
37 test_expect_success \
38 'read commit' \
39 'git cat-file commit `cat commitid` >commit'
41 test_expect_success \
42 'compare commit' \
43 'diff expected commit'
45 test_done