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

« back to all changes in this revision

Viewing changes to t/t1020-subdirectory.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:
22
22
 
23
23
test_expect_success 'update-index and ls-files' '
24
24
        cd $HERE &&
25
 
        git-update-index --add one &&
26
 
        case "`git-ls-files`" in
 
25
        git update-index --add one &&
 
26
        case "`git ls-files`" in
27
27
        one) echo ok one ;;
28
28
        *) echo bad one; exit 1 ;;
29
29
        esac &&
30
30
        cd dir &&
31
 
        git-update-index --add two &&
32
 
        case "`git-ls-files`" in
 
31
        git update-index --add two &&
 
32
        case "`git ls-files`" in
33
33
        two) echo ok two ;;
34
34
        *) echo bad two; exit 1 ;;
35
35
        esac &&
36
36
        cd .. &&
37
 
        case "`git-ls-files`" in
 
37
        case "`git ls-files`" in
38
38
        dir/two"$LF"one) echo ok both ;;
39
39
        *) echo bad; exit 1 ;;
40
40
        esac
42
42
 
43
43
test_expect_success 'cat-file' '
44
44
        cd $HERE &&
45
 
        two=`git-ls-files -s dir/two` &&
 
45
        two=`git ls-files -s dir/two` &&
46
46
        two=`expr "$two" : "[0-7]* \\([0-9a-f]*\\)"` &&
47
47
        echo "$two" &&
48
 
        git-cat-file -p "$two" >actual &&
 
48
        git cat-file -p "$two" >actual &&
49
49
        cmp dir/two actual &&
50
50
        cd dir &&
51
 
        git-cat-file -p "$two" >actual &&
 
51
        git cat-file -p "$two" >actual &&
52
52
        cmp two actual
53
53
'
54
54
rm -f actual dir/actual
57
57
        cd $HERE &&
58
58
        echo a >>one &&
59
59
        echo d >>dir/two &&
60
 
        case "`git-diff-files --name-only`" in
 
60
        case "`git diff-files --name-only`" in
61
61
        dir/two"$LF"one) echo ok top ;;
62
62
        *) echo bad top; exit 1 ;;
63
63
        esac &&
64
64
        # diff should not omit leading paths
65
65
        cd dir &&
66
 
        case "`git-diff-files --name-only`" in
 
66
        case "`git diff-files --name-only`" in
67
67
        dir/two"$LF"one) echo ok subdir ;;
68
68
        *) echo bad subdir; exit 1 ;;
69
69
        esac &&
70
 
        case "`git-diff-files --name-only .`" in
 
70
        case "`git diff-files --name-only .`" in
71
71
        dir/two) echo ok subdir limited ;;
72
72
        *) echo bad subdir limited; exit 1 ;;
73
73
        esac
75
75
 
76
76
test_expect_success 'write-tree' '
77
77
        cd $HERE &&
78
 
        top=`git-write-tree` &&
 
78
        top=`git write-tree` &&
79
79
        echo $top &&
80
80
        cd dir &&
81
 
        sub=`git-write-tree` &&
 
81
        sub=`git write-tree` &&
82
82
        echo $sub &&
83
83
        test "z$top" = "z$sub"
84
84
'
85
85
 
86
86
test_expect_success 'checkout-index' '
87
87
        cd $HERE &&
88
 
        git-checkout-index -f -u one &&
 
88
        git checkout-index -f -u one &&
89
89
        cmp one original.one &&
90
90
        cd dir &&
91
 
        git-checkout-index -f -u two &&
 
91
        git checkout-index -f -u two &&
92
92
        cmp two ../original.two
93
93
'
94
94
 
95
95
test_expect_success 'read-tree' '
96
96
        cd $HERE &&
97
97
        rm -f one dir/two &&
98
 
        tree=`git-write-tree` &&
99
 
        git-read-tree --reset -u "$tree" &&
 
98
        tree=`git write-tree` &&
 
99
        git read-tree --reset -u "$tree" &&
100
100
        cmp one original.one &&
101
101
        cmp dir/two original.two &&
102
102
        cd dir &&
103
103
        rm -f two &&
104
 
        git-read-tree --reset -u "$tree" &&
 
104
        git read-tree --reset -u "$tree" &&
105
105
        cmp two ../original.two &&
106
106
        cmp ../one ../original.one
107
107
'