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

« back to all changes in this revision

Viewing changes to t/t4003-diff-rename-1.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:
13
13
    'prepare reference tree' \
14
14
    'cat ../../COPYING >COPYING &&
15
15
     echo frotz >rezrov &&
16
 
    git-update-index --add COPYING rezrov &&
17
 
    tree=$(git-write-tree) &&
 
16
    git update-index --add COPYING rezrov &&
 
17
    tree=$(git write-tree) &&
18
18
    echo $tree'
19
19
 
20
20
test_expect_success \
22
22
    'sed -e 's/HOWEVER/However/' <COPYING >COPYING.1 &&
23
23
    sed -e 's/GPL/G.P.L/g' <COPYING >COPYING.2 &&
24
24
    rm -f COPYING &&
25
 
    git-update-index --add --remove COPYING COPYING.?'
 
25
    git update-index --add --remove COPYING COPYING.?'
26
26
 
27
27
# tree has COPYING and rezrov.  work tree has COPYING.1 and COPYING.2,
28
28
# both are slightly edited, and unchanged rezrov.  So we say you
29
29
# copy-and-edit one, and rename-and-edit the other.  We do not say
30
30
# anything about rezrov.
31
31
 
32
 
GIT_DIFF_OPTS=--unified=0 git-diff-index -M -p $tree >current
 
32
GIT_DIFF_OPTS=--unified=0 git diff-index -M -p $tree >current
33
33
cat >expected <<\EOF
34
34
diff --git a/COPYING b/COPYING.1
35
35
copy from COPYING
62
62
test_expect_success \
63
63
    'prepare work tree again' \
64
64
    'mv COPYING.2 COPYING &&
65
 
     git-update-index --add --remove COPYING COPYING.1 COPYING.2'
 
65
     git update-index --add --remove COPYING COPYING.1 COPYING.2'
66
66
 
67
67
# tree has COPYING and rezrov.  work tree has COPYING and COPYING.1,
68
68
# both are slightly edited, and unchanged rezrov.  So we say you
69
69
# edited one, and copy-and-edit the other.  We do not say
70
70
# anything about rezrov.
71
71
 
72
 
GIT_DIFF_OPTS=--unified=0 git-diff-index -C -p $tree >current
 
72
GIT_DIFF_OPTS=--unified=0 git diff-index -C -p $tree >current
73
73
cat >expected <<\EOF
74
74
diff --git a/COPYING b/COPYING
75
75
--- a/COPYING
100
100
test_expect_success \
101
101
    'prepare work tree once again' \
102
102
    'cat ../../COPYING >COPYING &&
103
 
     git-update-index --add --remove COPYING COPYING.1'
 
103
     git update-index --add --remove COPYING COPYING.1'
104
104
 
105
105
# tree has COPYING and rezrov.  work tree has COPYING and COPYING.1,
106
106
# but COPYING is not edited.  We say you copy-and-edit COPYING.1; this
107
107
# is only possible because -C mode now reports the unmodified file to
108
108
# the diff-core.  Unchanged rezrov, although being fed to
109
 
# git-diff-index as well, should not be mentioned.
 
109
# git diff-index as well, should not be mentioned.
110
110
 
111
111
GIT_DIFF_OPTS=--unified=0 \
112
 
    git-diff-index -C --find-copies-harder -p $tree >current
 
112
    git diff-index -C --find-copies-harder -p $tree >current
113
113
cat >expected <<\EOF
114
114
diff --git a/COPYING b/COPYING.1
115
115
copy from COPYING