3 # Copyright (c) 2005 Junio C Hamano
6 test_description='Test mode change diffs.
13 'echo frotz >rezrov &&
14 git update-index --add rezrov &&
15 tree=`git write-tree` &&
18 if [ "$(git config --get core.filemode)" = false ]
20 say 'filemode disabled on the filesystem, using update-index --chmod=+x'
22 'git update-index --chmod=+x' \
23 'git update-index rezrov &&
24 git update-index --chmod=+x rezrov &&
25 git diff-index $tree >current'
30 git update-index rezrov &&
31 git diff-index $tree >current'
34 _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
35 _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
36 sed -e 's/\(:100644 100755\) \('"$_x40"'\) \2 /\1 X X /' <current >check
37 echo ":100644 100755 X X M rezrov" >expected
41 'git diff expected check'