Den 29.02.2020 13:28, skreiv Gianluca Recchia:
> I like how pass works overall and the way it integrates with Git is great!
> However, there's one thing that I find slightly annoying: the default
> commit message is often not very descriptive of the change I made to an
> entry and I often find myself having to amend the commit in order to
> change the message.
> 
> I believe it would be an improvement in user experience if the user were
> given the ability to edit the commit message before committing, perhaps
> using the prepare-commit-msg hook to prefill the message buffer with
> what the default message would be, so that the user would only need to
> exit the editor if they're okay with the default message. Alternatively
> this could be optional in the local .gitconfig and overridable only for
> one command through a flag.

I agree with you that it can sometimes be useful to write something
else/more than "Edit password for /system/root using vi."

however "pass git commit --amend" will always work and be a no-op if you
don't change the commit message.  the only downside to this is that your
GPG passphrase has to be re-entered if you don't use a gpg-agent.

in other words, I suggest you make your own alias, something like

  mypass() {
    pass "$@" && {
      case $1 in
        edit|generate)
          pass git commit --amend
          ;;
      esac
    }
  }

(for Bourne shell, typed directly into mail program, so it's untested)

-- 
Kjetil T. Homme
Redpill Linpro - Changing the game

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to