Hi all,

I'm sending a silly patch to remove the period from the git commit messages
that pass generates.

The reason is that the first line of a commit message is used as the
subject line, and subjects usually don't end with period. OK, the real
reason is that patches that reduce the code base are cool!

For more info on the topic you can check out this nice post:
https://chris.beams.io/posts/git-commit/#end

Cheers,
Josep
From a10c7abc7c8bdf4be0957c32feeeac5f2e077cae Mon Sep 17 00:00:00 2001
From: Josep Llaneras <[email protected]>
Date: Fri, 28 Jul 2017 22:43:44 +0200
Subject: [PATCH] Remove period from git commit messages

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

diff --git a/src/password-store.sh b/src/password-store.sh
index d77ff12..b209a91 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -319,7 +319,7 @@ cmd_init() {
                rm -v -f "$gpg_id" || exit 1
                if [[ -n $INNER_GIT_DIR ]]; then
                        git -C "$INNER_GIT_DIR" rm -qr "$gpg_id"
-                       git_commit "Deinitialize ${gpg_id}${id_path:+ 
($id_path)}."
+                       git_commit "Deinitialize ${gpg_id}${id_path:+ 
($id_path)}"
                fi
                rmdir -p "${gpg_id%/*}" 2>/dev/null
        else
@@ -327,7 +327,7 @@ cmd_init() {
                printf "%s\n" "$@" > "$gpg_id"
                local id_print="$(printf "%s, " "$@")"
                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)}."
+               git_add_file "$gpg_id" "Set GPG id to ${id_print%, }${id_path:+ 
($id_path)}"
                if [[ -n $PASSWORD_STORE_SIGNING_KEY ]]; then
                        local signing_keys=( ) key
                        for key in $PASSWORD_STORE_SIGNING_KEY; do
@@ -336,12 +336,12 @@ cmd_init() {
                        $GPG "${GPG_OPTS[@]}" "${signing_keys[@]}" 
--detach-sign "$gpg_id" || die "Could not sign .gpg_id."
                        key="$($GPG --verify --status-fd=1 "$gpg_id.sig" 
"$gpg_id" 2>/dev/null | sed -n 's/\[GNUPG:\] VALIDSIG [A-F0-9]\{40\} .* 
\([A-F0-9]\{40\}\)$/\1/p')"
                        [[ -n $key ]] || die "Signing of .gpg_id unsuccessful."
-                       git_add_file "$gpg_id.sig" "Signing new GPG id with 
${key//[$IFS]/,}."
+                       git_add_file "$gpg_id.sig" "Signing new GPG id with 
${key//[$IFS]/,}"
                fi
        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)}."
+       git_add_file "$PREFIX/$id_path" "Reencrypt password store using new GPG 
id ${id_print%, }${id_path:+ ($id_path)}"
 }
 
 cmd_show() {
@@ -456,7 +456,7 @@ cmd_insert() {
                read -r -p "Enter password for $path: " -e password
                $GPG -e "${GPG_RECIPIENT_ARGS[@]}" -o "$passfile" 
"${GPG_OPTS[@]}" <<<"$password" || die "Password encryption aborted."
        fi
-       git_add_file "$passfile" "Add given password for $path to store."
+       git_add_file "$passfile" "Add given password for $path to store"
 }
 
 cmd_edit() {
@@ -484,7 +484,7 @@ cmd_edit() {
        while ! $GPG -e "${GPG_RECIPIENT_ARGS[@]}" -o "$passfile" 
"${GPG_OPTS[@]}" "$tmp_file"; do
                yesno "GPG encryption failed. Would you like to try again?"
        done
-       git_add_file "$passfile" "$action password for $path using 
${EDITOR:-vi}."
+       git_add_file "$passfile" "$action password for $path using 
${EDITOR:-vi}"
 }
 
 cmd_generate() {
@@ -528,7 +528,7 @@ cmd_generate() {
        fi
        local verb="Add"
        [[ $inplace -eq 1 ]] && verb="Replace"
-       git_add_file "$passfile" "$verb generated password for ${path}."
+       git_add_file "$passfile" "$verb generated password for ${path}"
 
        if [[ $clip -eq 1 ]]; then
                clip "$pass" "$path"
@@ -566,7 +566,7 @@ cmd_delete() {
        if [[ -n $INNER_GIT_DIR && ! -e $passfile ]]; then
                git -C "$INNER_GIT_DIR" rm -qr "$passfile"
                set_git "$passfile"
-               git_commit "Remove $path from store."
+               git_commit "Remove $path from store"
        fi
        rmdir -p "${passfile%/*}" 2>/dev/null
 }
@@ -610,19 +610,19 @@ cmd_copy_move() {
                if [[ -n $INNER_GIT_DIR && ! -e $old_path ]]; then
                        git -C "$INNER_GIT_DIR" rm -qr "$old_path" 2>/dev/null
                        set_git "$new_path"
-                       git_add_file "$new_path" "Rename ${1} to ${2}."
+                       git_add_file "$new_path" "Rename ${1} to ${2}"
                fi
                set_git "$old_path"
                if [[ -n $INNER_GIT_DIR && ! -e $old_path ]]; then
                        git -C "$INNER_GIT_DIR" rm -qr "$old_path" 2>/dev/null
                        set_git "$old_path"
-                       [[ -n $(git -C "$INNER_GIT_DIR" status --porcelain 
"$old_path") ]] && git_commit "Remove ${1}."
+                       [[ -n $(git -C "$INNER_GIT_DIR" status --porcelain 
"$old_path") ]] && git_commit "Remove ${1}"
                fi
                rmdir -p "$old_dir" 2>/dev/null
        else
                cp $interactive -r -v "$old_path" "$new_path" || exit 1
                [[ -e "$new_path" ]] && reencrypt_path "$new_path"
-               git_add_file "$new_path" "Copy ${1} to ${2}."
+               git_add_file "$new_path" "Copy ${1} to ${2}"
        fi
 }
 
@@ -631,10 +631,10 @@ cmd_git() {
        if [[ $1 == "init" ]]; then
                INNER_GIT_DIR="$PREFIX"
                git -C "$INNER_GIT_DIR" "$@" || exit 1
-               git_add_file "$PREFIX" "Add current contents of password store."
+               git_add_file "$PREFIX" "Add current contents of password store"
 
                echo '*.gpg diff=gpg' > "$PREFIX/.gitattributes"
-               git_add_file .gitattributes "Configure git repository for gpg 
file diff."
+               git_add_file .gitattributes "Configure git repository for gpg 
file diff"
                git -C "$INNER_GIT_DIR" config --local diff.gpg.binary true
                git -C "$INNER_GIT_DIR" config --local diff.gpg.textconv "$GPG 
-d ${GPG_OPTS[*]}"
        elif [[ -n $INNER_GIT_DIR ]]; then
-- 
2.7.4

_______________________________________________
Password-Store mailing list
[email protected]
https://lists.zx2c4.com/mailman/listinfo/password-store

Reply via email to