[PATCH] git: Do not end commit titles with dots
Sitaram Chamarty
sitaramc at gmail.com
Mon Apr 1 03:20:59 CEST 2019
On 01/04/2019 04.02, Artur Juraszek wrote:
> Umm, does someone have any more thoughts on this? ;]
>
> On 3/23/19 3:19 PM, HacKan wrote:
>> It's a nice detail, and doesn't hurt. +1
>>
>> On March 23, 2019 7:51:30 AM GMT-03:00, Artur Juraszek
>> <artur at juraszek.xyz> wrote:
>>
>> So, as far as I know treating the first line of commit messages
>> as _title_ and what follows as _body_ is a generally followed git practice,
>> and titles usually don't end with dots.
I've always used a trailing "..." to mean "you *should* read the rest of
the commit message to get the proper context".
A title without dots means the rest of the commit message is merely
additional explanation, may be interesting/useful but not *required* to
be read in order to get a feel for what is going on in that commit.
Helps me when I am looking at a "git log --oneline" (or equivalent)
regards
sitaram
>>
>> I realize it's a matter of personal preference to some extent though,
>> yet (according to me at least) they make the whole thing less readable -
>> similarly to using past tense, so I'd like to propose getting rid of them.
>>
>> Signed-off-by: Artur Juraszek <artur at juraszek.xyz>
>> ------------------------------------------------------------------------
>> 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 284eabf..e7c5aa2 100755
>> --- a/src/password-store.sh
>> +++ b/src/password-store.sh
>> @@ -337,7 +337,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
>> @@ -345,7 +345,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
>> @@ -354,12 +354,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() {
>> @@ -476,7 +476,7 @@ cmd_insert() {
>> read -r -p "Enter password for $path: " -e password
>> echo "$password" | $GPG -e "${GPG_RECIPIENT_ARGS[@]}" -o "$passfile" "${GPG_OPTS[@]}" || 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() {
>> @@ -503,7 +503,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() {
>> @@ -548,7 +548,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"
>> @@ -586,7 +586,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
>> }
>> @@ -630,19 +630,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
>> }
>> @@ -651,10 +651,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
>>
>>
>> --
>> HacKan || Iván
>>
>> _______________________________________________
>> Password-Store mailing list
>> Password-Store at lists.zx2c4.com
>> https://lists.zx2c4.com/mailman/listinfo/password-store
>
> _______________________________________________
> Password-Store mailing list
> Password-Store at lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/password-store
>
--
sitaram
More information about the Password-Store
mailing list