No worries, I can look at making a patch which will do this. Thanks for the 
feedback.

Several months later, I finally found some time to dedicate to this :)

I've attached another patch which moves the information about latest keys to 
lower in the commit messages.

~ Tim
diff --git i/src/password-store.sh w/src/password-store.sh
index 22e818f..41d99b5 100755
--- i/src/password-store.sh
+++ w/src/password-store.sh
@@ -346,9 +346,10 @@ cmd_init() {
        else
                mkdir -v -p "$PREFIX/$id_path"
                printf "%s\n" "$@" > "$gpg_id"
-               local id_print="$(printf "%s, " "$@")"
+               local id_print="$(printf "%s\n" "$@")"
                echo "Password store initialized for ${id_print%, }${id_path:+ 
($id_path)}"
-               git_add_file "$gpg_id" "Set GPG id to ${id_print%, }${id_path:+ 
($id_path)}."
+               commit_msg=$(printf "Set GPG ids%s\n\nNewest GPG ids:\n%s\n" 
"${id_path:+ in $id_path}" "${id_print}")
+               git_add_file "$gpg_id" "$commit_msg"
                if [[ -n $PASSWORD_STORE_SIGNING_KEY ]]; then
                        local signing_keys=( ) key
                        for key in $PASSWORD_STORE_SIGNING_KEY; do
@@ -362,7 +363,8 @@ cmd_init() {
        fi
 
        reencrypt_path "$PREFIX/$id_path"
-       git_add_file "$PREFIX/$id_path" "Reencrypt password store using new GPG 
id ${id_print%, }${id_path:+ ($id_path)}."
+       commit_msg=$(printf "Reencrypt password store with updated GPG 
ids%s\n\nRecipient GPG ids:\n%s\n" "${id_path:+ in $id_path}" "${id_print}")
+       git_add_file "$PREFIX/$id_path" "$commit_msg"
 }
 
 cmd_show() {

Reply via email to