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
commiteb4b32454264345ec6ae77a75e19d26dc710e176 (patch)
treeaf6e7b94df43c26068343571c963f9c96af78350
parent64eb50b695cbd71761e12c50c6362393532d54e2 (diff)
downloadgit-remote-gcrypt-eb4b32454264345ec6ae77a75e19d26dc710e176.zip
git-remote-gcrypt-eb4b32454264345ec6ae77a75e19d26dc710e176.tar.gz
git-remote-gcrypt-eb4b32454264345ec6ae77a75e19d26dc710e176.tar.bz2
Use a shorter, simpler repo ID since users will see it (occasionally)
-rw-r--r--README.rst10
-rwxr-xr-xgit-remote-gcrypt9
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} <gitref>``
- SHA-1 and its git ref
+``<sha-1> <gitref>``
+ Git object id and its ref
``pack :<hashtype>:<hash> <key>``
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 :<hashtype>:<hash> <generation>``
Packfile hash and its repack generation
-``repo :<hashtype>:<hash>``
+``repo <id>``
The repository id
``extn <name> ...``
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