Allow to edit the commit message
Kjetil Torgrim Homme
kjetil.homme at redpill-linpro.com
Mon Mar 2 17:02:40 CET 2020
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20200302/c428e595/attachment.asc>
More information about the Password-Store
mailing list