3 # Copyright (c) 2005 Junio C Hamano
6 test_description
='git-pack-object
18 dd if=/dev/zero bs=4k count=1 | tr "\\0" $i >$i &&
19 git-update-cache --add $i || exit
21 cat c >d && echo foo >>d && git-update-cache --add d &&
22 tree=`git-write-tree` && {
24 git-ls-tree $tree | sed -e "s/.* \\([0-9a-f]*\\) .*/\\1/"
28 'pack without delta' \
29 'git-pack-objects --window=0 test-1 <obj-list'
35 'unpack without delta' \
36 'GIT_OBJECT_DIRECTORY=.git2/objects &&
37 export GIT_OBJECT_DIRECTORY &&
39 git-unpack-objects test-1'
41 unset GIT_OBJECT_DIRECTORY
45 'check unpack without delta' \
46 '(cd ../.git && find objects -type f -print) |
49 cmp $path ../.git/$path || {
59 git-pack-objects test-2 <obj-list'
66 'GIT_OBJECT_DIRECTORY=.git2/objects &&
67 export GIT_OBJECT_DIRECTORY &&
69 git-unpack-objects test-2'
71 unset GIT_OBJECT_DIRECTORY
74 'check unpack with delta' \
75 '(cd ../.git && find objects -type f -print) |
78 cmp $path ../.git/$path || {