3 # packv4-test: Basic test script for packv4
5 # NOTE: it's assumed that you have git with packv4 support plus
6 # dump-sha1-list and dump-test installed
18 if [ $retcode -ne 0 ]; then
19 printf 'ERROR: %s\n' "$errmsg" >> /dev
/stderr
28 TMPDIR
=$
(mktemp
-d "$dirname") ||
exit 1
29 pushd $TMPDIR 1> /dev
/null
30 die_on_error $?
"could not enter $TMPDIR"
38 pack
=$
(ls $dot/objects
/pack
/*.pack
)
39 git-unpack-objects
< $pack
40 die_on_error $?
"could not unpack objects"
42 cp $dot/refs
/heads
/master .git
/refs
/heads
/master
43 die_on_error $?
"could not copy master file"
48 dump-sha1-list .git
/objects
/pack
/pack-
* > list.txt
49 die_on_error $?
"could not dump list"
51 dump-test list.txt
$PWD
52 die_on_error $?
"dump-test failed"
57 git-repack
-a -d --pack-version=4
58 die_on_error $?
"could not repack objects"
61 die_on_error $?
"could not prune objects"
64 if [ -z "$REPO" ]; then
65 echo -e "packv4-test < repo >"
69 create_tmp
"/tmp/packv4-test.XXXXXXXXXX"
72 die_on_error $?
"git-init failed"
74 # needed steps and basic tests