Encrypt and hash the new packfile streamingly
This commit is contained in:
parent
bc1c097c42
commit
e1f60d45bb
1 changed files with 9 additions and 5 deletions
|
@ -732,11 +732,15 @@ EOF
|
||||||
if [ -s "$tmp_objlist" ]
|
if [ -s "$tmp_objlist" ]
|
||||||
then
|
then
|
||||||
key_=$(genkey "$Packkey_bytes")
|
key_=$(genkey "$Packkey_bytes")
|
||||||
(GIT_ALTERNATE_OBJECT_DIRECTORIES=$Localdir \
|
pack_id=$(\
|
||||||
git pack-objects --stdout < "$tmp_objlist" ||
|
{
|
||||||
echo_kill "git pack-objects failed!") |
|
GIT_ALTERNATE_OBJECT_DIRECTORIES=$Localdir \
|
||||||
ENCRYPT "$key_" > "$tmp_encrypted"
|
git pack-objects --stdout < "$tmp_objlist" ||
|
||||||
pack_id=$(gpg_hash "$Hashtype" < "$tmp_encrypted")
|
echo_kill "git pack-objects failed!"
|
||||||
|
} | {
|
||||||
|
ENCRYPT "$key_" ||
|
||||||
|
echo_kill "gpg -c failed!"
|
||||||
|
} | tee "$tmp_encrypted" | gpg_hash "$Hashtype")
|
||||||
|
|
||||||
append_to @Packlist "pack :${Hashtype}:$pack_id $key_"
|
append_to @Packlist "pack :${Hashtype}:$pack_id $key_"
|
||||||
if isnonnull "$r_pack_delete"
|
if isnonnull "$r_pack_delete"
|
||||||
|
|
Loading…
Reference in a new issue