~ubuntu-branches/ubuntu/intrepid/git-core/intrepid-updates

« back to all changes in this revision

Viewing changes to t/t1200-tutorial.sh

  • Committer: Package Import Robot
  • Author(s): Gerrit Pape
  • Date: 2007-10-04 08:27:01 UTC
  • mfrom: (1.1.23)
  • Revision ID: package-import@ubuntu.com-20071004082701-rsd058ontoqz4i30
Tags: 1:1.5.3.4-1
new upstream point release (closes: #445188).

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
echo "Hello World" > hello
11
11
echo "Silly example" > example
12
12
 
13
 
git-update-index --add hello example
14
 
 
15
 
test_expect_success 'blob' "test blob = \"$(git-cat-file -t 557db03)\""
16
 
 
17
 
test_expect_success 'blob 557db03' "test \"Hello World\" = \"$(git-cat-file blob 557db03)\""
 
13
git update-index --add hello example
 
14
 
 
15
test_expect_success 'blob' "test blob = \"$(git cat-file -t 557db03)\""
 
16
 
 
17
test_expect_success 'blob 557db03' "test \"Hello World\" = \"$(git cat-file blob 557db03)\""
18
18
 
19
19
echo "It's a new day for git" >>hello
20
20
cat > diff.expect << EOF
26
26
 Hello World
27
27
+It's a new day for git
28
28
EOF
29
 
git-diff-files -p > diff.output
30
 
test_expect_success 'git-diff-files -p' 'cmp diff.expect diff.output'
 
29
git diff-files -p > diff.output
 
30
test_expect_success 'git diff-files -p' 'cmp diff.expect diff.output'
31
31
git diff > diff.output
32
32
test_expect_success 'git diff' 'cmp diff.expect diff.output'
33
33
 
34
 
tree=$(git-write-tree 2>/dev/null)
 
34
tree=$(git write-tree 2>/dev/null)
35
35
 
36
36
test_expect_success 'tree' "test 8988da15d077d4829fc51d8544c097def6644dbb = $tree"
37
37
 
38
 
output="$(echo "Initial commit" | git-commit-tree $(git-write-tree) 2>&1 > .git/refs/heads/master)"
 
38
output="$(echo "Initial commit" | git commit-tree $(git write-tree) 2>&1 > .git/refs/heads/master)"
39
39
 
40
 
git-diff-index -p HEAD > diff.output
41
 
test_expect_success 'git-diff-index -p HEAD' 'cmp diff.expect diff.output'
 
40
git diff-index -p HEAD > diff.output
 
41
test_expect_success 'git diff-index -p HEAD' 'cmp diff.expect diff.output'
42
42
 
43
43
git diff HEAD > diff.output
44
44
test_expect_success 'git diff HEAD' 'cmp diff.expect diff.output'
45
45
 
46
46
#rm hello
47
 
#test_expect_success 'git-read-tree --reset HEAD' "git-read-tree --reset HEAD ; test \"hello: needs update\" = \"$(git-update-index --refresh)\""
 
47
#test_expect_success 'git read-tree --reset HEAD' "git read-tree --reset HEAD ; test \"hello: needs update\" = \"$(git update-index --refresh)\""
48
48
 
49
49
cat > whatchanged.expect << EOF
50
50
commit VARIABLE
69
69
+Hello World
70
70
EOF
71
71
 
72
 
git-whatchanged -p --root | \
 
72
git whatchanged -p --root | \
73
73
        sed -e "1s/^\(.\{7\}\).\{40\}/\1VARIABLE/" \
74
74
                -e "2,3s/^\(.\{8\}\).*$/\1VARIABLE/" \
75
75
> whatchanged.output
76
 
test_expect_success 'git-whatchanged -p --root' 'cmp whatchanged.expect whatchanged.output'
 
76
test_expect_success 'git whatchanged -p --root' 'cmp whatchanged.expect whatchanged.output'
77
77
 
78
78
git tag my-first-tag
79
79
test_expect_success 'git tag my-first-tag' 'cmp .git/refs/heads/master .git/refs/tags/my-first-tag'
159
159
test_expect_failure '-> only packed objects' 'find -type f .git/objects/[0-9a-f][0-9a-f]'
160
160
 
161
161
test_done
162