From: root Date: Fri, 25 Jan 2013 03:36:22 +0000 (+0700) Subject: Encrypt and hash the new packfile streamingly X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=e1f60d45bbaca68179459944f5a518ceb6f4700d;p=gamesguru%2Fgit-remote-gcrypt.git Encrypt and hash the new packfile streamingly --- diff --git a/git-remote-gcrypt b/git-remote-gcrypt index 30f6840..e0b1133 100755 --- a/git-remote-gcrypt +++ b/git-remote-gcrypt @@ -732,11 +732,15 @@ EOF if [ -s "$tmp_objlist" ] then key_=$(genkey "$Packkey_bytes") - (GIT_ALTERNATE_OBJECT_DIRECTORIES=$Localdir \ - git pack-objects --stdout < "$tmp_objlist" || - echo_kill "git pack-objects failed!") | - ENCRYPT "$key_" > "$tmp_encrypted" - pack_id=$(gpg_hash "$Hashtype" < "$tmp_encrypted") + pack_id=$(\ + { + GIT_ALTERNATE_OBJECT_DIRECTORIES=$Localdir \ + git pack-objects --stdout < "$tmp_objlist" || + 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_" if isnonnull "$r_pack_delete"