From 8ee378a0f00a56cbffedee21fdbba30870d84436 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 26 Jun 2005 04:29:18 -0700 Subject: [PATCH] Finish initial cut of git-pack-object/git-unpack-object pair. This finishes the initial round of git-pack-object / git-unpack-object pair. They are now good enough to be used as a transport medium: - Fix delta direction in pack-objects; the original was computing delta to create the base object from the object to be squashed, which was quite unfriendly for unpacker ;-). - Add a script to test the very basics. - Implement unpacker for both regular and deltified objects. Signed-off-by: Junio C Hamano Signed-off-by: Linus Torvalds --- t/t5300-pack-object.sh | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100755 t/t5300-pack-object.sh (limited to 't') diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh new file mode 100755 index 0000000000..171af643e5 --- /dev/null +++ b/t/t5300-pack-object.sh @@ -0,0 +1,85 @@ +#!/bin/sh +# +# Copyright (c) 2005 Junio C Hamano +# + +test_description='git-pack-object + +' +. ./test-lib.sh + +TRASH=`pwd` + +test_expect_success \ + 'setup' \ + 'rm -f .git/index* + for i in a b c + do + dd if=/dev/zero bs=4k count=1 | tr "\\0" $i >$i && + git-update-cache --add $i || exit + done && + cat c >d && echo foo >>d && git-update-cache --add d && + tree=`git-write-tree` && { + echo $tree && + git-ls-tree $tree | sed -e "s/.* \\([0-9a-f]*\\) .*/\\1/" + } >obj-list' + +test_expect_success \ + 'pack without delta' \ + 'git-pack-objects --window=0 test-1