]> Nutra Git (v1) - gamesguru/git-remote-gcrypt.git/commitdiff
Use gpg --with-colons --print-md
authorroot <root@localhost>
Thu, 14 Feb 2013 00:00:00 +0000 (00:00 +0000)
committerroot <root@localhost>
Thu, 14 Feb 2013 00:00:00 +0000 (00:00 +0000)
git-remote-gcrypt

index 077e420188b5873d3824135735938b69cf7c90e0..80bd9d5c849d6e05bebfcbe7244d29fc371fc4d1 100755 (executable)
@@ -16,7 +16,8 @@ genkey()
 
 pack_hash()
 {
-       gpg --print-md SHA224  | tr -d ' ' | tr A-F a-f
+       local HASH=$(gpg --with-colons --print-md SHA224 | tr A-F a-f)
+       HASH=${HASH#:*:}; printf "%s" "${HASH%:}"
 }
 
 LOCALDIR="${GIT_DIR:-.git}/remote-gcrypt"