summaryrefslogtreecommitdiff
path: root/t/t5300-pack-object.sh
diff options
context:
space:
mode:
authorSergey Vlasov <vsu@altlinux.ru>2005-10-12 19:01:31 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-10-13 01:32:02 (GMT)
commit9cf6d3357aaaaa89dd86cc156221b7b604e9358c (patch)
tree05414ddb382cbd7a05eaf9181a5d995e6fd3a8a7 /t/t5300-pack-object.sh
parenta1451104ac2aa97f2e74818787ff54e29b2a77e5 (diff)
downloadgit-9cf6d3357aaaaa89dd86cc156221b7b604e9358c.zip
git-9cf6d3357aaaaa89dd86cc156221b7b604e9358c.tar.gz
git-9cf6d3357aaaaa89dd86cc156221b7b604e9358c.tar.bz2
Add git-index-pack utility
git-index-pack builds a pack index file for an existing packed archive. With this utility a packed archive which was transferred without the corresponding pack index can be added to objects/pack/ without repacking. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't/t5300-pack-object.sh')
-rwxr-xr-xt/t5300-pack-object.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
index bb62336..96db98b 100755
--- a/t/t5300-pack-object.sh
+++ b/t/t5300-pack-object.sh
@@ -165,4 +165,22 @@ test_expect_success \
:'
+test_expect_success \
+ 'build pack index for an existing pack' \
+ 'cp test-1-${packname_1}.pack test-3.pack &&
+ git-index-pack -o tmp.idx test-3.pack &&
+ cmp tmp.idx test-1-${packname_1}.idx &&
+
+ git-index-pack test-3.pack &&
+ cmp test-3.idx test-1-${packname_1}.idx &&
+
+ cp test-2-${packname_2}.pack test-3.pack &&
+ git-index-pack -o tmp.idx test-2-${packname_2}.pack &&
+ cmp tmp.idx test-2-${packname_2}.idx &&
+
+ git-index-pack test-3.pack &&
+ cmp test-3.idx test-2-${packname_2}.idx &&
+
+ :'
+
test_done