aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@localhost>2013-02-14 00:00:00 +0000
committerroot <root@localhost>2013-02-14 00:00:00 +0000
commit1227529ff5fb46aaf2bdc7b4b70338a9c486728f (patch)
treec3bc00bae0f358c5a4b0252d8453fdc219d620ff
parent1a7e58db58d326ecddddd36ef465e7ff7e2484e3 (diff)
downloadgit-remote-gcrypt-1227529ff5fb46aaf2bdc7b4b70338a9c486728f.zip
git-remote-gcrypt-1227529ff5fb46aaf2bdc7b4b70338a9c486728f.tar.gz
git-remote-gcrypt-1227529ff5fb46aaf2bdc7b4b70338a9c486728f.tar.bz2
Use gpg --with-colons --print-md
-rwxr-xr-xgit-remote-gcrypt3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-remote-gcrypt b/git-remote-gcrypt
index 077e420..80bd9d5 100755
--- a/git-remote-gcrypt
+++ b/git-remote-gcrypt
@@ -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"