Add more hooks to cover more user actions #4897
Replies: 2 comments
-
Thanks so much Jonas, for everything. Yeah, I totally understand, and just thought I'd throw this into a discussion in case it sounded interesting to people. Definitely low priority if it ever gets picked up. For my case, I can just use a standard git hook for a couple of these and not worry about others. |
Beta Was this translation helpful? Give feedback.
-
Adding hooks comes with a maintenance cost, so I only accept new hooks if someone can provide a good reason why it is needed. Sometimes a Git hook can be used, making an additional Magit hook unnecessary. Playing a sound after doing something is not a compelling enough reason and it leads down a path of a lot of new hooks. I think for such a use-case using advice is more appropriate. |
Beta Was this translation helpful? Give feedback.
-
I went browsing around magit's hooks and found ~80, wow! So I figured most user actions were being covered by these. The ones I personally found to be useful were:
post-stage
andpost-commit
(and maybelog-mode
).REQUEST: It'd be nice to see actions that could also be performed on fetch, push, rebase conflict, (I couldn't find these anyway) and probably a few others that we could brainstorm if needed.
My use case is a little silly, but I'd think others may have creative uses if more hooks were available. I'm playing with using magit with "sound effects". I have put together a collection of very short sounds that play when I use stage and commit. It's kind of rewarding to hear the fun sounds as I'm working through a commit. For example, here what happens every time I stage a hunk or file:
Beta Was this translation helpful? Give feedback.
All reactions