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>
This commit is contained in:

committed by
Junio C Hamano

parent
a1451104ac
commit
9cf6d3357a
@ -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
|
||||
|
Reference in New Issue
Block a user