[pass] [PATCH] Mention the path when changing GPG ids

Ben Butler-Cole ben at bridesmere.com
Fri Dec 11 22:48:00 CET 2015


We're sharing a store between several people, with different people allowed
to see different subtrees. It would be helpful to see, in the Git history,
which subtree a .gpg-id change applies to. Something like the patch below.

I'm not happy with the output that this produces when working on the
.gpg-id at the root of the tree. I considered changing throughout to put a
"/" at the start of all paths in logs or Git messages, but that seemed like
a big change so I thought I'd see if anyone has a better idea.


 src/password-store.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/password-store.sh b/src/password-store.sh
index d535a74..122e65e 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -285,12 +285,12 @@ cmd_init() {
         mkdir -v -p "$PREFIX/$id_path"
         printf "%s\n" "$@" > "$gpg_id"
         local id_print="$(printf "%s, " "$@")"
-        echo "Password store initialized for ${id_print%, }"
-        git_add_file "$gpg_id" "Set GPG id to ${id_print%, }."
+        echo "Set GPG id(s) for ${id_path} to ${id_print%, }"
+        git_add_file "$gpg_id" "Set GPG id(s) for ${id_path} to
${id_print%, }."

     reencrypt_path "$PREFIX/$id_path"
-    git_add_file "$PREFIX/$id_path" "Reencrypt password store using new
GPG id ${id_print%, }."
+    git_add_file "$PREFIX/$id_path" "Reencrypt password store at
${id_path} using new GPG id(s) ${id_print%, }."

 cmd_show() {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20151211/43336bc3/attachment.html>

More information about the Password-Store mailing list