From eb4b32454264345ec6ae77a75e19d26dc710e176 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 14 Feb 2013 00:00:00 +0000 Subject: Use a shorter, simpler repo ID since users will see it (occasionally) --- README.rst | 10 +++++----- git-remote-gcrypt | 9 +++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.rst b/README.rst index b70e3d8..28821c9 100644 --- a/README.rst +++ b/README.rst @@ -38,7 +38,7 @@ Quickstart git remote add cryptremote gcrypt::rsync://example.com:repo git push cryptremote master > gcrypt: Setting up new repository - > gcrypt: Repository ID is :SHA256:3a29d035adf234af7e[... ] + > gcrypt: Repository ID is :id:7VigUnLVYVtZx8oir34R > [ more lines .. ] > To gcrypt::[...] > * [new branch] master -> master @@ -153,12 +153,12 @@ Manifest file pack :SHA256:f2ad50316fbca42c553810aec3709c24974585ec1b34aae77d5cd4ba67092dc4 z8YoAnFpMlWPIYG8wo1adewd4Fp7Fo3PkI2mND49P1qm pack :SHA256:a6e17bb4c042bdfa8e38856ee6d058d0c0f0c575ace857c4795426492f379584 82+k2cbiUn7i2cW0dgXfyX6wXGpvVaQGj5sF59Y8my5W keep :SHA256:f2ad50316fbca42c553810aec3709c24974585ec1b34aae77d5cd4ba67092dc4 1 - repo :SHA256:ef8e52a7ea96761f713c14caa7190b5f3b55ff87ffe091cab40f7cbe1d3b5b96 + repo :id:OYiSleGirtLubEVqJpFF Each item extends until newline, and matches one of the following forms: -``[0-9a-f]{40} `` - SHA-1 and its git ref +`` `` + Git object id and its ref ``pack :: `` Packfile hash (`Hi`) and corresponding symmetric key (`Ki`). @@ -166,7 +166,7 @@ Each item extends until newline, and matches one of the following forms: ``keep :: `` Packfile hash and its repack generation -``repo ::`` +``repo `` The repository id ``extn ...`` diff --git a/git-remote-gcrypt b/git-remote-gcrypt index b96889f..561cf0a 100755 --- a/git-remote-gcrypt +++ b/git-remote-gcrypt @@ -312,7 +312,7 @@ make_new_repo() PUTREPO "$URL" # Needed assumption: the same user should have no duplicate Repoid - Repoid=":${Hashtype}:$(genkey 64 | pack_hash)" + Repoid=":id:$(genkey 15)" iseq "${NAME#gcrypt::}" "$URL" || { git config "remote.$NAME.gcrypt-id" "$Repoid" fix_config=1 @@ -454,13 +454,14 @@ ensure_connected() rcv_repoid=${rcv_repoid% *} if isnull "$Repoid" then - echo_info "Remote repo ID is $rcv_repoid" + echo_info "Remote ID is $rcv_repoid" Repoid=$rcv_repoid elif isnoteq "$rcv_repoid" "$Repoid" then echo_info "WARNING:" - echo_info "WARNING: Remote repository ID has changed!" - echo_info "WARNING: to $rcv_repoid" + echo_info "WARNING: Remote Repository ID has changed!" + echo_info "WARNING: from $Repoid" + echo_info "WARNING: to $rcv_repoid" echo_info "WARNING:" Repoid=$rcv_repoid else -- cgit v1.1